Inverts the page colors as a page action.
It inserts a <style> element into the <head> of the page. It uses filter: invert() to invert the colors.
If the <style> element already exists, it is removed instead.
Note that the
scriptsinpackage.jsonmustcdintosrcbefore runningweb-ext. Otherwise it complains about ES6 modules not being supported.
To build using web-ext, run:
pnpm we:buildTo run in Firefox Developer Edition, run:
pnpm run we:runWith the web extension Adaptive Tab Bar Color, use the websites:
- Light: Wikipedia
- Dark: Extension Workshop
- The page action will not run a second time. If running the extension via scripts, re-saving a file will fix it once.