moved some chromium-specific code into chromium.js (using extension.navigator namespace)
This commit is contained in:
parent
cf35b7056f
commit
69ba6581b0
3 changed files with 22 additions and 4 deletions
|
@ -17,7 +17,7 @@
|
|||
textsecure.registerOnLoadFunction(function() {
|
||||
if (!localStorage.getItem('first_install_ran')) {
|
||||
localStorage.setItem('first_install_ran', 1);
|
||||
chrome.tabs.create({url: "options.html"});
|
||||
extension.navigator.tabs.create("options.html");
|
||||
} else {
|
||||
if (isRegistrationDone()) {
|
||||
textsecure.subscribeToPush(function(message) {
|
||||
|
@ -26,7 +26,7 @@ textsecure.registerOnLoadFunction(function() {
|
|||
': "' + getString(message.message.body) + '"');
|
||||
var newUnreadCount = textsecure.storage.getUnencrypted("unreadCount", 0) + 1;
|
||||
textsecure.storage.putUnencrypted("unreadCount", newUnreadCount);
|
||||
chrome.browserAction.setBadgeText({text: newUnreadCount + ""});
|
||||
extension.navigator.setBadgeText(newUnreadCount);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue