From c8d4ab67838ebd464abc5f8ef3307842b4d1b97a Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 12 Dec 2019 09:33:58 +1030 Subject: [PATCH] Add toggle-colours and toggle-fonts --- README | 39 ++++++++++++++++++++++++++++++++++ dist/toggle-colours.xpi | Bin 0 -> 5918 bytes dist/toggle-fonts.xpi | Bin 0 -> 5805 bytes toggle-colours/README.md | 4 ++++ toggle-colours/background.js | 17 +++++++++++++++ toggle-colours/icons/icon.svg | 5 +++++ toggle-colours/manifest.json | 17 +++++++++++++++ toggle-fonts/README.md | 4 ++++ toggle-fonts/background.js | 11 ++++++++++ toggle-fonts/icons/icon.svg | 5 +++++ toggle-fonts/manifest.json | 17 +++++++++++++++ 11 files changed, 119 insertions(+) create mode 100644 README create mode 100644 dist/toggle-colours.xpi create mode 100644 dist/toggle-fonts.xpi create mode 100644 toggle-colours/README.md create mode 100644 toggle-colours/background.js create mode 100644 toggle-colours/icons/icon.svg create mode 100644 toggle-colours/manifest.json create mode 100644 toggle-fonts/README.md create mode 100644 toggle-fonts/background.js create mode 100644 toggle-fonts/icons/icon.svg create mode 100644 toggle-fonts/manifest.json diff --git a/README b/README new file mode 100644 index 0000000..683bcd5 --- /dev/null +++ b/README @@ -0,0 +1,39 @@ + +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. diff --git a/dist/toggle-colours.xpi b/dist/toggle-colours.xpi new file mode 100644 index 0000000000000000000000000000000000000000..902d896a28c0bc412de8e7015f9c6aafd6e5e79c GIT binary patch literal 5918 zcma)=1yEdB*2f$70HKlKnm}-O*93P91a}&T1ZZ5+xJ$4=uttM4ZVB$eH3WBpC(zgj zvokxpJF~Uldv#yEdiBn)?)~3?om2OyDIy^Q0RR9xz?U4XoWY=m9Ebw|oZtZf4_}pK zwIo?zsK~K9I(geVIGD1zx|vR;z7?6gBJH*2HcyRWxZ>)WJ|YWFSAWiAn8E@X7#kuX zute3D?_*3aPGViLc&(Y@pdT?wpC^kykdR^6lK`Y~gZijsxsC2Ewg1>_`;n9L{q*wI z`1{tCclOqeH()x+Bj|`Q@ghK})(Q)Z6lZ&S>u^o<*Is6!c zsOM}SfHE-}Ce?w5-o8HOtanxOUPWTvi%KsI7g>hbG!%d!;7*0jhA_7kl8k0C6Z#<} zgf(~vyif9CE((9S7o8f#n|oVN6i`D+m>_XS#0!JzE|GN{Vds^RC1thPx;qIe&p}A> z_LXzZ#sGFV04=GNi(lxWAyW)*y}7n~J;3dEQmOb7oh5*m?cWsvEU>XieDBPcbH^E> zUye|K1+t%zS#)yHmz~4HE|BaKE)tRR=KP1&bAnzYnps68BgX9^($JU2O4@964yRqLE_bLR>xuvp-dBro|R(@T2%QjNF+$$=Z~bn#J6zh zAp!tl7F@|6R3iX-cvCr4q(f*y)zoGmV243?M9A0!Hm^rm3>)3MnD-O+golm0F90i@ zal1b8lu;tFm!l$MPv>ri+3Qg0`}OU$crI{L52_%=NwyJYnCB(OZI<|gTPD73m#y!BaT83(o$48#-@jKosv~O|uv0Ya9N5t=Ueh-6 z?+4~oL>9S;*Enwj-Oh>JJ_l6yX13)^f0tqu6!2e7Kv~67E|yTRd?BwPPyTvu1R zosh19`PBLz{z0H-l!?wakaV^SBbP1*Ajqd~Ct2GcBGTN!kQO+crX(yi1~ZUxC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=N736WAutKedABIr$Y^56bI`IN=>XzGYpD%@{e6g?@ScLhLK( z7&lFB6jmTG6ZY0@}!<`=?BHR$yhj;Wa(8dzsws2gbdD zG-M@Zlx5i*Eq;@TTKO;DVHlLeM54h)`P#ZnA?7LW#dv_fiKz1tJsnx8aD1WOeLB`_ z0p|5o1eS>gS<5ZkswH9LXz3%4r^aZteQE(!NY}m9lbV2>P<_oAQOA(`Aq^*z#{M;3 z+(5%^jstCSxI+AMf)AaZ5MZQ6-~Ap^-=~Cs@AUk!p^jF`WBoBD5C83|%w3va4OM2NDXhVAZ=j0s^qj$#HN(uQGd%~v||-IIkzwN24a zv$imDRD%lMRYRj9kG{cWL|^b%8U$w$9r&R3HO1VdVmW}*R9BgJ2P5i|JWt-n;%5E` zraykYTXd~L^QN>>amkXlBDy30$8lM?qgRRW$4t3gEr$TQS7Z7P4Ewzwi7dN4a78y)E1B2f_XLOOMaZ%5hNiQ4j|} zVx_fc8Ii<~g@+!Skr7`A?<-zCEsB918KX>VYmat4e@mrBEB&C5=BbqRa1u7Qk2wOl zG`E%LR3rpq@$DJnnz!qIVKku&n#bT#>HG zU(Rn=z`e8oW@Y!?%LfAG?}WcApAT^l!TEtT_kGa+S26tu^1m0J2P6Q12RM)%dIb2N zW$4f8{aqn?ApK){=(vBd{#RN0*Cqd53jc#y7f5^G_Wge)^nXSEUAp@NnIHH9AMn4E z-vjPnxAi}h(*y3|3P9Ms$Ng#8KU39z68_WV|A>DetlxY7Pr~nQZ8s}5MHJMBpV04b NgZrjx#e>NJ{|B#3R_*`* literal 0 HcmV?d00001 diff --git a/dist/toggle-fonts.xpi b/dist/toggle-fonts.xpi new file mode 100644 index 0000000000000000000000000000000000000000..dd7e0a4d3116e2388ec6306052ab69334b9475f7 GIT binary patch literal 5805 zcma)A1yq#X)*iZ~V?>ZHK^ml_lFyL^Xhb>(kd~4m ze)#VFuit;a@2>lwcb#{=>s@C*>+EMgXYX~kmMR7&1polR1sL3is25KIX#5BPfI|`h z;P$V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y0+0-w>jEGx2Vuq9ZRWr!LO}w)%sNA^pFoM3<;vQxl=A|GHn3 zXHb2ROZ)Wzg6qNhS`aRfiv%*!%@@%#7Lm@IpfKDV)c@Oj`QHeEZITd!u_ZDjSc}b?OMU|AoZS4* zBRN4BxRE(^_U~7LKy2`ADoJc`!1?I0Mn#9S`>(g~yM`s$K2%X2f zbXp_{0%euu9u}DoSfLDRN~WV*DHYCB8IdN6!5x-I^27Ce+1HjUrHPNyOwsk3!m$Hb zXw-2i>(tmXd)ozBO9@yF#$dgH9&Z3uk350M!=b)G|9;dI2zIK&ER`r#{yY~ugJy71 zzLeE|KU9F%4q`SIxx!EzPNCt4w+Y=N>Z|m?b8o~y(54i0WzjL{=0{`mWyB1LWdimc zd*P(IMF2&Rwog?WwoaZ1Tw-b56o~IwF`b!-}UVo6o`ekfZ7AFC;8szu&_?BX%iygOi%%z%Sx`n!G zD7VOXk{DUM89J)SHZD)*$>Z*}x``d9i5&ZM@aO{wa&MJ-g|4#q-eKu`UR=4c;n(4e zpf7^3T$;8ItzlGW^1@YCtX$;l+=<-%n#(b-mLB@^Zv$WXm@GZ$7Orsj4z2+|I8XWv z24t8o9VZZf9cOP8 zRLkS&EmFa;=xH>C4l0^DL+&5|RUtfI;JgOUN&6Cov+gUOqid<6p;KV|=l0=^KYxsX z8&&^}Yd6irTLij)BK%!JyS2MD&JQfVX-odU%G*C6|8o_&g#-Xd06Vg=M1cQVQ+{vn z@2biz(m%HM<-g0vzcE*d0f7HkcK$Qu-(|GlkjFQT-T#{3ZsGnM)_+e- zw{W*301ZO==dk`xQ~!?e?<)U?{Vjsajp+YI^IED{*td&tZ=UDq0D$DJ$N>KX1QjRU literal 0 HcmV?d00001 diff --git a/toggle-colours/README.md b/toggle-colours/README.md new file mode 100644 index 0000000..15b1e56 --- /dev/null +++ b/toggle-colours/README.md @@ -0,0 +1,4 @@ +#Toggle Document Colours +Toggles between "never" and "always" for colour override setting. + +Affects all windows. \ No newline at end of file diff --git a/toggle-colours/background.js b/toggle-colours/background.js new file mode 100644 index 0000000..3debb02 --- /dev/null +++ b/toggle-colours/background.js @@ -0,0 +1,17 @@ + +function toggle() { + var docSetting = browser.browserSettings.overrideDocumentColors.get({}); + + docSetting.then(function callback(junk){ + var value; + if (junk.value == 'never') { + value = 'always'; + } else { + value = 'never'; + } + browser.browserSettings.overrideDocumentColors + .set({value: value}); + }); +} + +browser.browserAction.onClicked.addListener(toggle); diff --git a/toggle-colours/icons/icon.svg b/toggle-colours/icons/icon.svg new file mode 100644 index 0000000..ecfefe9 --- /dev/null +++ b/toggle-colours/icons/icon.svg @@ -0,0 +1,5 @@ + + + + C + diff --git a/toggle-colours/manifest.json b/toggle-colours/manifest.json new file mode 100644 index 0000000..c65d22b --- /dev/null +++ b/toggle-colours/manifest.json @@ -0,0 +1,17 @@ +{ + "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 +} diff --git a/toggle-fonts/README.md b/toggle-fonts/README.md new file mode 100644 index 0000000..bca3144 --- /dev/null +++ b/toggle-fonts/README.md @@ -0,0 +1,4 @@ +#Toggle Document Fonts +Toggles between use document fonts. + +Affects all windows. \ No newline at end of file diff --git a/toggle-fonts/background.js b/toggle-fonts/background.js new file mode 100644 index 0000000..2b8f04d --- /dev/null +++ b/toggle-fonts/background.js @@ -0,0 +1,11 @@ + +function toggle() { + browser.browserSettings.useDocumentFonts + .get({}) + .then(function callback(junk){ + browser.browserSettings.useDocumentFonts + .set({value: !junk.value}); + }); +} + +browser.browserAction.onClicked.addListener(toggle); diff --git a/toggle-fonts/icons/icon.svg b/toggle-fonts/icons/icon.svg new file mode 100644 index 0000000..2bb324f --- /dev/null +++ b/toggle-fonts/icons/icon.svg @@ -0,0 +1,5 @@ + + + + F + diff --git a/toggle-fonts/manifest.json b/toggle-fonts/manifest.json new file mode 100644 index 0000000..7cf253d --- /dev/null +++ b/toggle-fonts/manifest.json @@ -0,0 +1,17 @@ +{ + "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 +} -- 2.39.2