Closed DerekZiemba closed 1 month ago
Duplicate of https://github.com/Tampermonkey/tampermonkey/issues/347#issuecomment-269039234
Sorry.
I believe this issue is different because I've used FF off and on & these scripts did work for several years. This is some recent change.
If I can get my old laptop to start up and not immediately BSOD or update FF, I can prove that they use to work.
Local file support was possible by using a hack that has been fixed by Firefox (Windows first, and Linux much later). The official issue is the only way to ask for support if this.
That's disappointing. I was able to fix my chrome issues with the following, so guess I stick with chrome for now. It's pretty ridiculous this needs to be worked around since I could create the trusted policy literally just a few lines before .innerHTML = myhtml
window.trustedTypes.createPolicy('default', {
createHTML: (string, sink) => string
});
someElement.innerHTML = window.trustedTypes.defaultPolicy.createHTML(text);
workaround: use xampp apache web server, start the server, then put your "script.js" in the htdocs folder. now you can use require. found this on my own because i was trying to get https://blog.exupero.org/live-reloading-tampermonkey-scripts/ to work on firefox. shoutout to my mobile dev instructor from uni.
Attempted to migrate to Firefox from Chrome due to manifest v3 & the final straw, my Youtube script no longer works.
I moved everything over to firefox & imported/exported for every single extension. But none of my scripts are working in Firefox that work fine in Chrome!
Both Google & Bing are giving me nothing for the error below. I feel this should be a simple setting or something, but I can't find it, or ANYTHING about it that's more recent than 3-5 years ago / still applies. I've grown accustomed to modern search engines being crap, & these days AI needing to fill the gap, but even ChatGPT/BingAI doesn't have the answer.
Below is an example that works fine in Chrome. I can't figure out how to allow local file access in Firefox.
Expected Behavior
For
@require
&@resource
directives to work with local filesActual Behavior
injected: @resource: can't load @resource 'STYLE' from URL 'file:///C:/Dropbox/Scripts/.js/TM/websites/reddit/reddit.css': Access to this or all local files is forbidden! content.js:8:1206
@require: couldn't load @require from URL 'file:///C:/Dropbox/Scripts/.js/TM/core/GM.js': Access to this or all local files is forbidden! GM.user.js:2:9
@require: couldn't load @require from URL 'file:///C:/Dropbox/Scripts/.js/TM/websites/reddit/.index.js': Access to this or all local files is forbidden! RESEnhancementScript-2.user.js:2:9
Specifications
Script
(Please give an example of the script if applicable.)
Inject Style early as possible to avoid white flash / or style change while loading
The script