Open bughit opened 6 years ago
Hi @bughit
Thanks for your report! The web extension indeed doesn't work for local files opened directly from the file system. And unfortunately it won't be possible to disable JS for them.
The web extension API is quite strict about what's possible and not (compared to the legacy XUL based extensions) meaning that there's no API for disabling/enabling JS at this time.
My web extension uses Content-Security-Policy
headers to enable/disable JavaScript - while this works for normal sites, it won't work for local files.
However, I see some room for improvement here:
If you want to disable JavaScript for local files, I'm afraid you'll have to install a local web server and access them through localhost
.
I hope you understand!
Alternatively, you could use the meta
tag for this, cf. https://developers.google.com/web/fundamentals/security/csp/#the_meta_tag.
DJ 2.3.1 Fx 62.0.3
javascript is not disabled, in either domain or tab mode