This is however easily fixed with for example:
Code: Select all
let a = document.createElement("a");
a.href = url;
a.port = ""
url = a.href;
However, in case the browser.contentScripts is not available, the webglblocking becomes utterly unreliable, the result changing almost every reload. That does not surprise me though. I did some testing using browser.tabs.executeScript in onHeadersReceived, but could not make it work either, excluding the filter.ondata method that seems reliable. Can't figure why though.
Also, if I may ask, what is the purpose of returning object from the getContext rather than null?