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
- Size: under 20 KB in total, icons included. The code is plain JavaScript and CSS with no libraries and no build step, so what you install is the source code as written.
- Network: Shadeflip never contacts a server. It has no analytics or ads, doesn't check for updates itself, and doesn't load code from anywhere else. Your browser handles updates through the store.
- Tracking: Shadeflip keeps no history. It also doesn't leave a fixed marker on pages, so a website can't use it to recognize you or follow you.
- License: the full source is on GitHub under the BSD 3-Clause License.
What happens when you flip a site
- You click the toolbar button or press Alt+Shift+D.
- 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.
- 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.
- 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
- Access to all websites. To apply your choice as a page loads, before you see it, on any site you pick, without asking for permission site by site. Shadeflip reads only a page's address and background colors.
- Storage. To save your settings.
- Active tab and scripting. To flip a tab that was already open when you installed Shadeflip, and to add the flip rules to a page you've flipped.
- Context menus. To put a Shadeflip settings item on the toolbar button's right-click menu.
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.