You can control your online experience with this simple and convenient tool. It also offers customization options for images, PDFs and built-in dark themes. I don't really understand why the addon frame is being handled differently and I can't understand how it wouldn't work, but it doesn't (at time of writing).īeyond that, it's all fairly straight forward wiring from one side of things to another. Night Eye is a Firefox extension that lets you switch websites between dark and light mode, adjust colors, contrast, saturation, brightness and blue light filter. The problem is, simply, the datalist element doesn't work at all in the preferences panel. This would allow for an autocomplete component to allow the user to either freely enter a Firefox Color URL or select from the autocomplete list an installed theme. Now my toggleTo will receive a constant so that it can handle the updating of the Firefox theme when the CSS expression evaluated value changes.īeyond that bit of code, the background script to the addon re-uses the code from Firefox Color to decode the URL into a theme JavaScript object which can then be used to update the current theme.Īlong with supporting the URLs from Firefox Color, I decided to enumerate the installed themes the user had to let them select a preinstalled theme (which actually allows for a more customised theme as they can support background images).įrustratingly, the UI for this part of the Firefox addon preferences should have used a datalist element bound to an input text box. matchMedia ( '(prefers-color-scheme: dark)' ). This means I can have an event listen to notify when the operating system switches into a dark mode (or light mode) using the following code: window. The nice "today I learned" bit of the project was that the matchMedia JavaScript method inherits events, so along with actually testing whether a CSS expression matches, I can watch for when it starts to match. This is all managed in the plugin preferences so it's tucked away and you don't have to think about it again once setup. Once installed, you can select an existing installed theme for light and dark setup, or you can paste a URL from Firefox Color and it'll automatically parse and activate it. If you can't wait, then I've uploaded a self signed version of the addon on github which you can install by going to about:addons and then clicking the settings gear on the top right, and selecting "Install Add-on From File." The addon is currently going through the approval process (currently 52 of 52!), but when it's live it will be available here. I cannot get the extension to work on Firefox, even with. I've published 38 videos for new developers, designers, UX, UI, product owners and anyone who needs to conquer the command line today. The KeeTheme plugin is intended for changing KeePass appearance independent of the active system theme. The 'Google Docs dark mode' extension I had been using was incompatible with margin-altering extensions (would leave the default page background/added margins stark white even with everything else black/grey) but this one works flawlessly, and its more visually cohesive, too.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |