From cd69333f4119125a94af23d2b41a20e40b6da98f Mon Sep 17 00:00:00 2001 From: Kevin F Date: Tue, 10 Aug 2021 19:40:14 +0000 Subject: [PATCH] Added whitelist button --- icons/keyboard-ico.png | Bin 2290 -> 2485 bytes icons/logo-big-dark.png | Bin 0 -> 19575 bytes manifest.json | 13 ++++- settings/button.css | 41 ++++++++++++++ settings/button.html | 14 +++++ settings/button.js | 119 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 185 insertions(+), 2 deletions(-) create mode 100644 icons/logo-big-dark.png create mode 100644 settings/button.css create mode 100644 settings/button.html create mode 100644 settings/button.js diff --git a/icons/keyboard-ico.png b/icons/keyboard-ico.png index 1438985aff02b64e67abeac4ddce0f3741d73c46..67c290d5540a9dc22cb1e6dac5e9f1d15339d575 100644 GIT binary patch literal 2485 zcmV;m2}<^fP)e5S$S}i*Af5OvTRGTEFZz#F{FWT2FiU0CTTegc8swD zq|hT5M}Q<`=(J3mq-`doB+#Y|Z8Dv9U?@q!gccKyq>M2~ILd7d28`<{VTXkCHU6=+?7))n}FUV$)wY|GM@9l+;m|y8xSUQn>g;HAyF;E&4Ty@0LUNZb7&YdpSiN3v z<@N~vxEmVG3+BzKotZU_(H4U#CI;zQGcaJ#U_?h75FYMbA5GKH*w~1wiVE!bA_x2O za$C%U2lndSr?$GPYFu1={B9jL^z8A3^Ut4r%+(fy(PYBQ^B1E3fPu8=;UES$f3^UZ ziZ7zB&H?U^F`Lo*$$s!OdT{Z=`4;mkFE4|`;rP++ygl#84(!~%t!Xmerf4#OP$4ZN z3*CG4gquv{#L*+zwR1ZuQ7O}eg@xg<$GagVZ7P!5wZnvzR8*9eq3Ha%kl45y8psU2 z=Douwv+VKr#*Wc0T`I2xp|jTkw6SU|d9jckft z&6|R=SulKa`7#Pl=c9pEgl)T^pa4;{Ym9g4-1)Y#<>lpq*Hl--OePc`XOTIoYieM% z+E94*49=hP?nE%YEDO)WLXQ|VTE??7H_OXshyreRgEU4&=%xJR<3A#O$|Ounn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H8%sZBcwThgSX8@^zfr-pz&5r{Stp7^`ERIbXW&HGlhV_ui;! zVN>&ttdQ$jus8g4S$6Nm#Z?A>_@U*eEYtqL74NScXg@nWs!H>2N1&~tCMyi`UBc{vW2Q zq{_KS@kJ@0Qqv8cWD-8RZ<<_usN1Aj8Ru?8Ie^k20vdTF`G`@lz+rx*Qg4Y^*_ z8F*mrwm3l>hhJT<(%=4n=XBzc2((1AV+mWW`Q1}~!mYJNzw0-actoYTWN184`@bb7 z>BfY1d+*}fQY35b`=y_UObIlH=Y=8D2pf*WmKmpy)WY zSiM@etoPEZYPNYlTKr7`7T~b@09uE^GC9", - "storage" + "storage", + "tabs" ], @@ -24,6 +25,14 @@ "page": "settings/options.html" }, + + "browser_action": { + "default_icon": "icons/keyboard-ico.png", + "default_title": "Private Keyboard", + "default_popup": "settings/button.html" + }, + + "browser_specific_settings": { "gecko": { "id": "keyboardaddon@voidnet.tech" diff --git a/settings/button.css b/settings/button.css new file mode 100644 index 0000000..73d60a3 --- /dev/null +++ b/settings/button.css @@ -0,0 +1,41 @@ +body{ + font-family: Arial, Helvetica, sans-serif; +} +header{ + font-size: 25px; +} + +#reloadPage{ + display: none; +} + +button { + margin-top: 10px; + box-shadow:inset 0px 1px 0px 0px #bee2f9; + background-color:#307cac; + border-radius:6px; + border:1px solid #3866a3; + display:inline-block; + cursor:pointer; + color:white; + font-family:Arial; + font-size:15px; + font-weight:bold; + padding:6px 10px; + text-decoration:none; + text-shadow:0px 1px 0px #7cacde; + width: 75%; + margin-left: 15%; +} +button:hover { + background:linear-gradient(to bottom, #468ccf 5%, #63b8ee 100%); + background-color:#468ccf; +} +button:active { + position:relative; + top:1px; +} +button[disabled=true]{ + opacity: 50%; +} + diff --git a/settings/button.html b/settings/button.html new file mode 100644 index 0000000..a51a227 --- /dev/null +++ b/settings/button.html @@ -0,0 +1,14 @@ + + + + + Private Keyboard + + + + +
+ +

Refresh the page to apply

+ + \ No newline at end of file diff --git a/settings/button.js b/settings/button.js new file mode 100644 index 0000000..ed8ed51 --- /dev/null +++ b/settings/button.js @@ -0,0 +1,119 @@ +function reportError(e){ + console.debug(e) +} + +function extractHostname(url) { + // Credit to stackoverflow users https://stackoverflow.com/a/23945027 + let hostname = '' + //find & remove protocol (http, ftp, etc.) and get hostname + + if (url.indexOf("//") > -1) { + hostname = url.split('/')[2]; + } + else { + hostname = url.split('/')[0]; + } + + //find & remove port number + hostname = hostname.split(':')[0]; + //find & remove "?" + hostname = hostname.split('?')[0]; + + return hostname; +} + +browser.storage.sync.get("keyboardprivacywhitelist") + +.then(function(val){ + if (typeof val.keyboardprivacywhitelist === 'undefined'){ + return + } + browser.tabs.query({active: true, currentWindow: true}) + .then(function(tabVal){ + let hostname = extractHostname(tabVal[0].url).replace('www.', '') + document.getElementById('siteDomain').innerText = hostname + if (val.keyboardprivacywhitelist.includes(hostname)) { + document.getElementById('toggleSite').innerText = 'Enable Keyboard Privacy' + } + }) + .catch(reportError); +}, + function(val){ + console.debug(val) + } +) + +function fixDuplicateCommas(){ + // Yeah i'm lazy + browser.storage.sync.get("keyboardprivacywhitelist") + + .then(function(val){ + let whitelist = val.keyboardprivacywhitelist + console.debug('whitelist ' + whitelist) + if (typeof val.keyboardprivacywhitelist === 'undefined' || val.keyboardprivacywhitelist == ''){ + return + } + whitelist = whitelist.replaceAll(',,', '') + if (whitelist.endsWith(',')){ + whitelist = whitelist.substring(0, whitelist.length - 1); + } + browser.storage.sync.set({ + keyboardprivacywhitelist: whitelist + }); + }) + +} + +function changeWhitelist(domain, add){ + browser.storage.sync.get("keyboardprivacywhitelist") + + .then(function(val){ + let whitelist = val.keyboardprivacywhitelist + let comma = ',' + if (typeof val.keyboardprivacywhitelist === 'undefined' || val.keyboardprivacywhitelist == ''){ + whitelist = '' + comma = '' + } + if (domain.startsWith('www.')){ + domain = domain.replace('www.', '') + } + if (add){ + browser.storage.sync.set({ + keyboardprivacywhitelist: whitelist + comma + domain + }); + } + else{ + if (! whitelist.endsWith(domain)){ + comma = ',' + } + else{ + comma = '' + } + browser.storage.sync.set({ + keyboardprivacywhitelist: whitelist.replace(domain + comma, '') + }); + } + }) + +} + +document.getElementById('toggleSite').onclick = async function(){ + if (document.getElementById('toggleSite').getAttribute('disabled')){ + console.debug('disabled still') + return + } + document.getElementById('toggleSite').setAttribute('disabled', true) + if (document.getElementById('toggleSite').innerText.startsWith('Disable')){ + document.getElementById('toggleSite').innerText = 'Enable Keyboard Privacy' + changeWhitelist(document.getElementById('siteDomain').innerText, true) + } + else if (document.getElementById('toggleSite').innerText.startsWith('Enable')){ + document.getElementById('toggleSite').innerText = 'Disable Keyboard Privacy' + changeWhitelist(document.getElementById('siteDomain').innerText, false) + } + setTimeout(function(){fixDuplicateCommas()}, 1000) + setTimeout(function(){ + document.getElementById('toggleSite').removeAttribute('disabled') + }, 3000) + document.getElementById('reloadPage').style.display = 'block' +} \ No newline at end of file