Open CendioOssman opened 2 years ago
I want to add a script that dynamically adjusts a page's style sheets. Unfortunately, that fails for many sites with:
Uncaught DOMException: CSSStyleSheet.rules getter: Not allowed to access cross-origin stylesheet debugger eval code:1:1
The code to provoke this is simply a document.styleSheets[0].cssRules. Try it on e.g. StackOverflow.
document.styleSheets[0].cssRules
I'm guessing some bypass is needed to allow a user script more privileges that a normal page script.
Is this already possible somehow? Or does something need to change within greasemonkey and/or Firefox?
I found this discussion which seemed relevant, but I'm not sure of the implications for greasemonkey:
https://bugzilla.mozilla.org/show_bug.cgi?id=1393022
Your bugzilla link looks very relevant, and I don't think Greasemonkey can do anything here.
A shame. I'll give Mozilla a poke and see if this limitation can be lifted.
I want to add a script that dynamically adjusts a page's style sheets. Unfortunately, that fails for many sites with:
The code to provoke this is simply a
document.styleSheets[0].cssRules
. Try it on e.g. StackOverflow.I'm guessing some bypass is needed to allow a user script more privileges that a normal page script.
Is this already possible somehow? Or does something need to change within greasemonkey and/or Firefox?
I found this discussion which seemed relevant, but I'm not sure of the implications for greasemonkey:
https://bugzilla.mozilla.org/show_bug.cgi?id=1393022