![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://lemmy.world/pictrs/image/d4155aa6-7ec0-4527-b43e-0db480bcf1c0.png)
I don’t think Firefox Color can do that. At best you could test and set colors using Color, and then export the settings for both as a theme .zip or .xpi files, and then combine the two to a single manifest.json file. Inside the manifest, a "theme"
key would be color properties for “normal” theme and "dark_theme"
would be for dark-theme. After that you would submit the theme package to get it signed after which it can be installed as a real theme.
I suspect that the cause is from bug 1897477 - whereas previously your script overrode the original command ctrl+f event callback, with this change both callbacks happen. So when findbar is already shown, your script will hide it, but then the original Firefox function shows it again.
You can probably change the last part to be like this instead (I don’t really get what the middle part is supposed to do, but meh):
(function() { document.getElementById("cmd_find").addEventListener("command",(ev) => { ucjsToggleFindBar(); ev.stopPropagation(); }, { capture: true }) })();