Skip to content

Commit

Permalink
feat(toolbar): Implements logic to display gift badge icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo committed Jul 12, 2024
1 parent 1aa237f commit 7b625a7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/toolbar_button.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ function updateToolbarButton(tab) {
};

chrome.storage.local.get('options', function(items){
if (
'dismiss_news_badge' in items['options'] &&
items['options']['dismiss_news_badge']
) {
chrome.browserAction.setBadgeText({ text: '' });
} else {
chrome.browserAction.setBadgeText({ text: '📣' });
}

if (tab === null || tab === undefined) {
// There's code in Firefox that can be called before the defaults are set
// and before the tab is even established. Catch that, and handle it or
Expand Down

0 comments on commit 7b625a7

Please sign in to comment.