Instead of each developer trying to imitate the native UI widgets, it's now possible for extensions to use NSView and friends. Moreover, native code opens up availability of Apple and third-party frameworks, as well as multiple threads. Distribution through the App Store provides access to analytics, ratings, and a faster review process; if you thought waiting a week for your app to be reviewed was too long, I'm here to tell you that version 0.1 of Nightlight took more than a month to be accepted to the Extension Gallery.
The original idea for Nightlight was simple: darken every element's background color and lighten its text color. While this would be trivial to implement if every page was static, today's web is dynamic. The DOM tree can be modified at any time by scripts, so we can no longer just darken everything at page load. My initial solution was to use MutationObserver to detect when new elements were added. This worked, but I thought we could do better.
This approach also had deficiencies that I tried to fix by adding workarounds (blacklist, aggressive mode); when software reaches this stage, it's time to reevaluate.
The original implementation was also destructive: it overwrote the
style attributes of elements without keeping the original values. CSS fixes this problem as well.
The auto-on/off feature has been reimplemented in native code using Timer from Foundation.
Lastly, the before/after colors in the popover are gone. I put this in initially to aid debugging, and later it became a pet feature. In the end I realized it had dubious utility, and it wasn't worth the time to make it work reliably.