@ParticleCore, thanks very much for restarting the FF extension. For the record, the previous version had been mostly broken for me since May or so. I uninstalled it a while ago and tried some other options but none of them worked very well either.
I just installed 1.2.0 and found a bug with the Dark theme settings: Even though the setting was toggled to "on" when I first opened the Iridium settings after installing, when I opened a YouTube page for testing, it appeared in the default theme. The dark theme only took effect after I toggled the Iridium setting off and then back on again.
Then I reloaded the YouTube page I was testing with, and – surprise – it was back to the default theme! As before, the only way to get the setting to take effect was to toggle it on and off.
I did not have any kind of (native YouTube cookie-based) theme setting previously. I'm using FF 69.0.3.
Are you using incognito mode or do you have any configuration that disables cookies or clears them when you leave a web page?
Yes, I use another extension, Forget Me Not, which clears cookies when I leave a domain. I didn't think that was relevant here, since a) I didn't leave the domain while testing, i.e., the YouTube tab was open the whole time, and b) I don't see any cookie from Iridium in my cookie list. I also tried disabling FMN, but it didn't fix the problem.
I see, I will have to test that scenario with that extension because I had already taken into account the browser's own mechanism, but not an extension.
The extension does not leave any cookie of its own, it leaves a YouTube cookie with the name "PREF", that's the one that is holding the dark theme value YouTube uses to read the user choice.
I will see what I can do, but it is possible there is no solution around the other extension you have installed.
I don't think Forget Me Not is the source of the problem. I just tested with a new Firefox profile, with all FF preferences set to defaults and only Iridium installed, no other extensions.
I got exactly the same result: Dark theme did not take effect until I toggled the setting.
When I loaded a YouTube page, the browser console showed this error once –
Error: WebExtension context not found! ExtensionParent.jsm:1239:13
– and this one 15 times:
cookie is null background.js:201
updateCookie moz-extension://7383fe06-ccf0-c14c-99f5-b26046c0d7fd/js/background.js:201
apply self-hosted:4417
applySafeWithoutClone resource://gre/modules/ExtensionCommon.jsm:588
wrapPromise resource://gre/modules/ExtensionCommon.jsm:797
I also checked the cookie list in FF's preferences, and I don't see "PREF" or any other YouTube cookie there.
For cookie to be null means that cookies are either disabled on the browser settings or there is a very specific scenario that escaped me, which is the one I'm mostly inclined to investigate first. Given that there are plenty of brand new logics with this new version, a lot of combination scenarios are bound to elude me and show up during use.
Sorry to say it, but this isn't fixed on my end yet (although the null cookie error is no longer appearing). Details below, but basically the problem seems to be with the expiration date of the PREF cookie.
After that I installed one other extension, Cookie Quick Manager, so I could see what was going on with the cookies. Now I could see that the PREF cookie was set when Iridium was enabled – AND that it was already expired. In fact, it was set to expire at the exact second the first YouTube tab was loaded.
I tried editing it to a later date, and voila, the pref worked as expected: All open YouTube tabs switched to the desired mode instantly, and new and reloaded tabs appeared in the correct mode as well.