When attempting to load a script in my extension's content script, I encounter an issue:
let s = document.createElement("script");
s.setAttribute("async", "");
s.setAttribute("type", "module");
s.setAttribute("src", "https://gamergirlandco.github.io/some_script.js");
s.setAttribute("crossorigin", "anonymous")
document.body.appendChild(s)
An error is thrown stating:
WebExtension content scripts may only load modules with moz-extension URLs and not: “https://gamergirlandco.github.io/some_script.js”.
I attempted to resolve this by adding *://gamergirlandco.github.io/*
to the permissions
array in manifest.json
, but it did not solve the problem.
Any assistance on how to address this would be greatly appreciated.