spotify-web-ads-remover
spotify-web-ads-remover copied to clipboard
Firefox support
Looks good, but - are you running this on Firefox, and the extension successfully blocks ads?
Well, truth is, I did not test it, I don't know how...
You can test this using Firefox's developer page. You have instructions for example here.
oh thank, I will check that
I tested it (finally using the instruction found here -> https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/
and it fails because it does not recognize "wsHook" as a variable.
What puzzle me is that this variable does not seem to exist in firefox, nor in chrome (when tapping "wsHook" in inspector, both return me undefined variable), but chrome does not seem to throw any error while running the script.
This variable is defined here: https://github.com/tomer8007/spotify-web-ads-remover/blob/2c56b7cc85a1ea60cb68d24b4cea7f3d9fb4bcca/content_script.js#L43 Perhaps there is a problem with the script injection on page load. You can take a look at the other addon here, in which it works. Hopefully this helps.
I found the root of the problem ->
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). content_script.js:35:43
not sure how this could be fixed, since it will block any script injection.
Actually this makes me think about how it actually worked in Chrome so far, so I've pushed 66ad20f688a5945d4a169fd1939a3f86ad89c317 for completeness. Please try to see if it fixes anything on Firefox now.
I downloaded the code and compiled for testing into Firefox, and it works. Can I create a pull request for uploading the manifest updated for working also on Firefox?
@lorenanunez You can open a separate pull request, given that you actually get ads blocked on Firefox
im encountering the same issue after installing from the main branch, installing on firefox, changing all instances of chrome -> browser and extension.getURL -> runtime.getURL
a possible workaround would be disabling content security policy browser wide, but i dont think thats a good idea
still occurs
oh i forgot to restart the browser, well anyways setting security.csp.enable
to false in about:config and the extension works as flawlessly