Skip to content

Commit

Permalink
background.ts: Fixed icon color switching on Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
avi12 committed Jun 18, 2023
1 parent ea9bfa6 commit 5ac5d20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ chrome.runtime.onInstalled.addListener(async ({ reason }) => {
});

function setIcon(isEnabled = true): void {
chrome.action.setIcon({
const action = chrome.action || chrome.browserAction; // chrome.browserAction for Firefox MV2
action.setIcon({
path: isEnabled ? pathIconOn : pathIconOff
});
}
Expand Down

0 comments on commit 5ac5d20

Please sign in to comment.