Files
holesail-browser/extension/background/background-boot.js
T
Raven Scott 34303e7a80
CI / Build & Test (push) Successful in 3m22s
Fix Firefox install: use background.scripts instead of service_worker
Firefox MV3 does not support background.service_worker. Split background
into background-boot.js (globals) and background-main.js (startup logic);
Chrome keeps using importScripts() in background.js, Firefox manifest uses
background.scripts with the same file list so the extension loads in both.
2026-03-03 02:15:03 -05:00

13 lines
465 B
JavaScript

/**
* Boot globals for background (shared by service worker and Firefox scripts context).
* Loaded first so DEBUG_VERBOSE and browser are available to logs.js and others.
*/
const SW_VERSION = 3; // increment to force service worker reload detection
/** Set to true for super detailed debug logging. */
const DEBUG_VERBOSE = false;
const browser = (typeof chrome !== 'undefined' && chrome.runtime?.connectNative)
? chrome
: (globalThis.browser ?? chrome);