Shadeflip

How it works, and why it's safe

Shadeflip is small enough to read in one sitting. This page describes what it changes on a site, what it saves, and what it uses each browser permission for.

Summary

What happens when you flip a site

  1. You click the toolbar button or press Alt+Shift+D.
  2. Shadeflip checks the page's background at a few points on screen to tell whether it already looks dark or light. The check runs on your device and reads background colors only. It doesn't read the page's text.
  3. If the page needs to change, Shadeflip adds a single CSS filter that inverts its colors, then inverts photos, video and embeds again so they keep their real colors. Shadeflip doesn't modify the page's code or stylesheets.
  4. Shadeflip saves your choice for that exact address, such as example.com, and applies it the next time the site loads, before the page appears. The setting doesn't apply to other addresses, including mail.example.com.

If you ask for dark and the site is already dark, Shadeflip does nothing. If a site switches its own theme later, Shadeflip notices and adjusts.

What it stores

Shadeflip stores your default for all sites and a list of the sites you've set, each marked dark, light or off. For each site on that list, it also notes whether the page looked dark or light last time, so the right color shows while the page loads. Shadeflip doesn't save sites that you visit but haven't set.

Your browser keeps your settings in its extension storage. If you use your browser's own sync, the browser may copy them to your other devices; Shadeflip itself never sends them anywhere. In a private window, a site you flip stays flipped until you close the tab, and Shadeflip saves nothing.

Why websites can't track you through it

To flip a page, Shadeflip marks it with an attribute. The attribute's name is random: Shadeflip makes up a new one on every page load and never stores it. Shadeflip also adds its CSS rules only to pages you've flipped. As a result, a site has no known name to look for, and because nothing Shadeflip adds is the same on two sites or two visits, no site can use it to link your visits together.

What each permission is for

It doesn't ask for your history, tabs list, downloads, cookies or network traffic.

Check it yourself

The whole extension is six small files: manifest.json, content.js, background.js, flip.css, options.html and options.js. Read them on GitHub, or compare them with the files your browser installed. If you find a problem, open an issue. See also the privacy policy.

Further reading

I also wrote about why Shadeflip exists and how it compares with Dark Reader.