Remove crossorigin attributes in snapshots.

When loading a snapshot locally, same-origin of null will not load them
This commit is contained in:
Fletcher Hazlehurst 2020-10-11 17:26:05 -06:00
parent dadc64e0d5
commit ed304b56e0
3 changed files with 25 additions and 4 deletions

View file

@ -55,8 +55,9 @@ async function babelWorker(ev) {
// Patch single-file-helper
else if (sourcefile === 'resource/SingleFileZ/lib/single-file/single-file-helper.js') {
transformed = contents.replace('addEventListener("single-filez-user-script-init"',
'window.addEventListener("single-filez-user-script-init"');
transformed = contents
.replace('dispatchEvent(', 'window.dispatchEvent(')
.replace(/addEventListener\(/g, 'window.addEventListener(');
}
// Patch index.js - This is a SingleFileZ issue. SingleFileZ does not typically use