Urgent.News

What's breaking now, across thousands of outlets.

Tech

I Built a Firefox Dark Mode Extension That Schedules Itself by Sunset — Here's Why

The problem with dark mode extensions is that you have to remember to turn them on. By evening, you're staring at a bright white screen. You remember to toggle dark mode. Then you close the laptop. In the morning, you're in dark mode when you don't need it. I got tired of this cycle. So I built NightOwl — a Firefox extension that automatically schedules dark mode based on your local sunset time.…

Dark mode extensions often require users to manually enable them. By night, bright screens can strain the eyes. Users often toggle dark mode on, only to have it turned off when not needed in the morning. This cycle prompted the creation of NightOwl, a Firefox extension that automatically schedules dark mode based on a user's local sunset time.

The extension employs the browser's Geolocation API to ascertain the user's location, then determines the local sunset time. When sunset occurs, NightOwl activates dark mode; conversely, sunrise prompts the extension to deactivate it. The process is API key-free, account-free, and functions offline, preserving user location data on their device.

Users have the option to establish a custom schedule if they prefer dark mode from 9pm to 7am, irrespective of sunset. The current iteration utilizes CSS invert(1) hue-rotate(180deg) — the customary force dark mode technique. This approach works across all websites, including those that disregard system dark mode settings. However, it's not flawless; certain images may appear inverted, and some websites already possess proper dark themes that look odd when inverted.

Firefox 157 and later introduced a prefers-color-scheme override via devtools, which handles this more effectively, but only for sites with implemented proper dark themes. NightOwl handles the rest. Had I built this now, I would utilize the browserSettings.overrideContentColorScheme API to toggle dark mode at the browser level, then revert to the invert filter for non-responsive sites in a future version.

NightOwl is free and open-source, available on Firefox AMO and soon on GitHub. Its current user base stands at 4 out of 5, having grown since its launch two weeks ago. Feedback on the force dark versus CSS dark mode debate is welcome in the comments section.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Unattended retail in Australia: what actually works

By Hanley Li, Brisbane I am Hanley Li, and I keep coming back to one question about venues across Australia: would people there buy something if nobody was behind the counter?

  • Unattended retail cabinets allow customers to purchase items without cashiers.
  • Best suited for locations with existing foot traffic but limited service hours.
  • Customer success factors: product availability, cabinet functionality, easy payment methods.

Building an Area Chart for Credit Coverage Trends

Building an Area Chart for Credit Coverage Trends jquick-pdf by example — demo #3 of 184. Every article in this series ships one complete, runnable demo: a template file and a Java class.

  • Create PDF file named 03area.pdf
  • Use JPdfX template language for credit report
  • Java class JQuickCreditReport03AreaTest renders chart

Introducing OrgExplorer v1.0.0: Making Open-Source Organization Insights More Accessible

Finally, we're excited to announce the first release of OrgExplorer v1.0.0 , launched on October 25, 2026! OrgExplorer started with a simple idea: building a platform that helps contributors, mentors…

  • OrgExplorer v1.0.0 open-source platform launched
  • Developed during Google Summer of Code by Ritik and collaborators
  • Features include organization overview, repository insights, and contributor analytics

opensource

Cloudflare's security-audit-skill has 45,592 stars on GitHub. The Chinese translation was published today and has zero. That gap is the whole reason the translation exists — not because the original…

  • Cloudflare's security-audit-skill has 45,592 stars on GitHub
  • Chinese translation released but has zero stars
  • Translation provides detailed guidance for non-native speakers

More from Sunday 25 October →