Skip to content

Commit

Permalink
Alert on error in the badge
Browse files Browse the repository at this point in the history
  • Loading branch information
ailispaw committed Jul 9, 2016
1 parent 0636540 commit 78e023e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ WikiHubNotifications.prototype = {
self.timer = setTimeout(function() {
self.init.call(self);
}, self.TIMER_INTERVAL);
} else {
chrome.browserAction.setBadgeBackgroundColor({color : [255, 0, 0, 255]});
chrome.browserAction.setBadgeText({text : 'X'});
}
if (typeof callback == 'function') callback();
});
Expand All @@ -47,7 +50,7 @@ WikiHubNotifications.prototype = {
updateBadge : function() {
var self = this;

chrome.browserAction.setBadgeBackgroundColor({color : [255, 0, 0, 255]});
chrome.browserAction.setBadgeBackgroundColor({color : [0, 152, 204, 255]});
if (self.unreads.length) {
chrome.browserAction.setBadgeText({text : '' + self.unreads.length});
}
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version" : 2,
"name" : "__MSG_my_name__",
"version" : "0.1.0",
"version" : "0.1.1",

"default_locale" : "en",
"description" : "__MSG_my_desc__",
Expand Down

0 comments on commit 78e023e

Please sign in to comment.