import browser from 'webextension-polyfill'; import {Settings} from '../settings/settings.js'; export async function updateBadge(settings: Settings): Promise { const queueLength = settings.queue.length.toString(); await browser.browserAction.setBadgeText({ text: queueLength === '0' ? null : queueLength, }); await browser.browserAction.setBadgeBackgroundColor({color: '#2a2041'}); browser.browserAction.setBadgeTextColor({color: '#f2efff'}); }