// Tiny cross-browser shim: Firefox exposes the WebExtension APIs as
// `browser.*` (promise-based); Chrome/Edge expose `chrome.*` (promise-based
// too, for the APIs this extension uses, as of MV3). Using one alias
// everywhere lets background.js/content-script.js/popup.js stay identical
// across both browsers instead of forking the whole codebase. `var`, and
// guarded, rather than `const`: content-script.js is (re-)injected into the
// surfed page's SHARED isolated world once per hit, and a second injection
// on top of a still-live one (e.g. a same-document SPA navigation that
// doesn't tear the isolated world down) must not throw on redeclaration.
if (typeof api === 'undefined') {
  var api = typeof browser !== 'undefined' ? browser : chrome; // eslint-disable-line no-var
}
