problems with file:/// URLs
I have a website which works when I use it via HTTPS. However, it is broken when I use the same website via file:///. This is a new problem that did not occur ~3 weeks ago.
It works fine when I disable NoScript.
Only a part of the JavaScript seems to work and I see JavaScript error messages that don't make sense, like an undefined variable which is clearly defined:
HTML code:
<script type='text/javascript' >
var currentIndex = 1;
</script>
JavaScript error:
Uncaught ReferenceError: currentIndex is not defined
Other errors indicate that a script is executed twice for some reason:
Uncaught SyntaxError: redeclaration of const gallery_data
Could it be that separate JavaScript files are now isolated from each other when using file:// URLs?
I tried switching to a JavaScript module and using export/import of the required variables and functions. But this also doesn't work, as loading of JavaScript files with type="module" is blocked by CORS when using file:// URLs.
OK, this might be different from #489, but it's hard to say without looking at the actual code which triggers it.
Could you please share it? Thanks!
A copy of the code can be found here:
https://tikei.de/~scorpi/demogallery/
It works when used with the above link, but doesn't work when used via file:///.
I re-checked with a fresh browser profile and it works fine. So there is something weird in my normal browser profile. I already reset NoScript to its default settings, but this didn't help.