Open wtwhite opened 6 months ago
Supporting Firefox will be harder than this, since under Manifest V3, Firefox's background scripts (the closest equivalent to Chrome's service workers) can no longer be persistent, and non-persistent scripts unload after a few seconds of activity, so they can't, e.g., use global variables. 😞
It seems Chrome service workers can also shut down after 30s of inactivity... So we shouldn't be using global variables in any case.
We need to use a service worker in a browser extension, but although Chrome and Firefox nominally both support Chrome's extension model, their syntaxes conflict: Chrome needs
manifest.json
to contain aservice_worker
key, while Firefox needs it to contain ascripts
key.For now, I'll support Chrome ( + Chromium). Supporting Firefox only requires changing one line in
manifest.json
.