--- /dev/null
+
+INTRODUCTION
+------------
+
+This is a couple of trivial but useful extensions for mozilla firefox.
+
+toggle-colours
+
+ Switches the "Override the colours specified by the page with your
+ selections above" in the "Language and Appearance - > Colours" pane
+ between "none" and "always".
+
+toggle-fonts
+
+ Switches the "Allow pages to choose their own fonts, instead of your
+ selections above" in the "Language and Appearance - > Fonts and
+ Colours -> Advanced" pane between "on" and "off".
+
+PACKAGING
+---------
+
+Unfortunately because mozilla are a bunch of cunts there's no way to
+create an installable 'xpi' without creating an account on their site
+and getting them to sign it.
+
+If you're so inclined, have at it:
+
+https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions
+
+Due to the above i've included the signed packages I use in "dist/".
+They can be installed by going to "about:addons" and selecting
+"Install Add-on from File..." menu item from the "anus menu" over
+on the right hand side.
+
+LICENSE
+-------
+
+There's basically nothing to them, so they are public domain or
+equivalent.
--- /dev/null
+#Toggle Document Colours\r
+Toggles between "never" and "always" for colour override setting.\r
+\r
+Affects all windows.
\ No newline at end of file
--- /dev/null
+\r
+function toggle() {\r
+ var docSetting = browser.browserSettings.overrideDocumentColors.get({});\r
+\r
+ docSetting.then(function callback(junk){\r
+ var value;\r
+ if (junk.value == 'never') {\r
+ value = 'always';\r
+ } else {\r
+ value = 'never';\r
+ }\r
+ browser.browserSettings.overrideDocumentColors\r
+ .set({value: value});\r
+ });\r
+}\r
+\r
+browser.browserAction.onClicked.addListener(toggle);\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 10">
+ <text style="font-style:italic; font-size:10px" x="0" y="8.5">C</text>
+</svg>
--- /dev/null
+{
+ "name": "Toggle Document Colours",
+ "version": "0.0.0",
+ "description": "Toggles beween never and always for colour override globally.",
+ "background": {
+ "scripts": ["background.js"]
+ },
+ "browser_action": {
+ "default_icon": "icons/icon.svg",
+ "default_title": "Toggle Document Colours"
+ },
+ "author": "NotZed",
+ "permissions": [
+ "browserSettings"
+ ],
+ "manifest_version": 2
+}
--- /dev/null
+#Toggle Document Fonts\r
+Toggles between use document fonts.\r
+\r
+Affects all windows.
\ No newline at end of file
--- /dev/null
+\r
+function toggle() {\r
+ browser.browserSettings.useDocumentFonts\r
+ .get({})\r
+ .then(function callback(junk){\r
+ browser.browserSettings.useDocumentFonts\r
+ .set({value: !junk.value});\r
+ });\r
+}\r
+\r
+browser.browserAction.onClicked.addListener(toggle);\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 7 10">
+ <text style="font-style:italic; font-size:10px" x="0" y="8.5">F</text>
+</svg>
--- /dev/null
+{
+ "name": "Toggle Document Fonts",
+ "version": "0.0.0",
+ "description": "Toggles document font override.",
+ "background": {
+ "scripts": ["background.js"]
+ },
+ "browser_action": {
+ "default_icon": "icons/icon.svg",
+ "default_title": "Toggle Document Fonts"
+ },
+ "author": "NotZed",
+ "permissions": [
+ "browserSettings"
+ ],
+ "manifest_version": 2
+}