(my apologies if this ends up as a cross-post. I first posted to dev-addons, and then was told to post here)
I’m trying to port a Chrome extension to Firefox.
My extension initially loads a CSS file (using a ‘css’ entry in the ‘content_scripts’ part of the manifest). It later overrides that CSS using a new injected <style>
(by appending a <style>
tag to <head>
). This all works fine in Chrome (and also on Firefox when I load my script via Tampermonkey), but when I load my Chrome extension into Firefox, this particular piece has no effect.
I’m not getting any errors in the console, and I can see the <style>
tag getting properly inserted into <head>
. But it just has no effect. It’s as if it’s not there.
Is there some trick to this on Firefox?