muleyo / VideoAdBlockForTwitch

Blocks Ads on Twitch.tv.
GNU General Public License v3.0
1.62k stars 114 forks source link

Fix importScripts errors #54

Open michael-harvey opened 2 years ago

michael-harvey commented 2 years ago

Running into a SyntaxError: WorkerGlobalScope.importScripts: Failed to load worker script at "type "" where the getWasmWorkerUrl method is returning type ", an invalid url.

It seems like twitchBlobUrl itself is returning the correct url for the wasmworker script anyway, i.e. https://www.twitch.tv/assets/amazon-ivs-wasmworker.min-5526a9c4389a99792948.js, so it seems as though the method getWasmWorkerUrl isn't needed anymore?

Simply returning the twitchBlobUrl resolves the issues for firefox/chrome.

Feel free to close if this change is inappropriate.

Cheers for the extension! 🍻