Forces dark background/text inside the message HTML iframe on Nextcloud Mail
Nextcloud made the decision to not apply darkmode to message iframes. Every time I open an email in dark mode, I get flash-banged. Their reasoning is that some senders might design their email for light mode only, so some elements might not work in dark mode. Personally, I never see this. Even so, there are only so many ways that it might clash, and should be solvable.
Anyways, I made this script and haven't had much issues with it. If there is an issue, it might need modification for rare occurrences, but so far I have not seen any. YOU WILL NEED TO MODIFY THE @match LINE (Obviously). Just keep the /apps/mail/* at the end of your nextcloud domain.