Skip to content

Commit

Permalink
setBadgeBackgroundColor
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamlinerm committed Jan 14, 2025
1 parent 5d07be8 commit f70f089
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ console.log("background loaded")
const Badges: { [key: string]: string | number } = {}
const isMobile = /Android/i.test(navigator.userAgent)
const isFirefox = !!browser?.webRequest
if (isFirefox) browser.browserAction.setBadgeBackgroundColor({ color: "#e60010" })
else chrome.action.setBadgeBackgroundColor({ color: "#e60010" })
// Increases Badge by 1
async function increaseBadge(tabId: number) {
if (Badges?.[tabId] === undefined || typeof Badges[tabId] !== "number") {
Expand Down

0 comments on commit f70f089

Please sign in to comment.