Hi,
This is my firefox addon: Sauron - Dark mode for all websites
And here is all the code available: https://github.com/rishabhmw/sauron
It works as expected in chrome but in firefox the jquery in content scripts doesn’t work for some websites such as facebook, quora, and nytimes. I either get jQuery.Deferred exception: $ is not defined mainReady@moz-extension://39071a01-0540-46e3-b16e-96bd576ca827/content.js:81:5 @moz-extension://39071a01-0540-46e3-b16e-96bd576ca827/content.js:139:13 l@moz-extension://39071a01-0540-46e3-b16e-96bd576ca827/jquery-3.3.1.min.js:2:29373 Deferred/then/a/</c<@moz-extension://39071a01-0540-46e3-b16e-96bd576ca827/jquery-3.3.1.min.js:2:29677 undefined
or no error at all (very rarely) in the console.
If I try to manipulate DOM with just javascript it works but not with jQuery. Also If the page is already loaded when the extension is disabled and then if the extension is enabled after the page has loaded the DOM changes magically.
Please help,
Rishabh