referer-mod
referer-mod copied to clipboard
Replace dynamic content script
Manifest v3 does not allow dynamically generated content scripts (see the migration guide). Referer Modifier currently uses one to inject the current configuration into content scripts to work around Firefox bug #1601496. Alternatives (loading from storage, messaging the background script) are asynchronous and very likely don't resolve before site scripts get a chance to run and possibly access document.referrer.
What this means is:
- If the Firefox bug is fixed, the content script can be removed without any loss of function, no matter the manifest version.
- As long as the bug isn't fixed Referer Modifier will have to stick with Manifest v2 as long as it's supported. If Manifest v3 becomes mandatory without a fix we'll have to accept that page scripts that access
document.referrerearly will see an unmodified value.