diff --git a/oldStuff/icon128.psd b/oldStuff/icon128.psd new file mode 100644 index 0000000..c92b9bd Binary files /dev/null and b/oldStuff/icon128.psd differ diff --git a/oldStuff/icon128_g.png b/oldStuff/icon128_g.png new file mode 100644 index 0000000..067f32e Binary files /dev/null and b/oldStuff/icon128_g.png differ diff --git a/oldStuff/icon128_o.png b/oldStuff/icon128_o.png new file mode 100644 index 0000000..6be2819 Binary files /dev/null and b/oldStuff/icon128_o.png differ diff --git a/oldStuff/plus.png b/oldStuff/plus.png new file mode 100644 index 0000000..f604fb5 Binary files /dev/null and b/oldStuff/plus.png differ diff --git a/oldStuff/popup.html b/oldStuff/popup.html new file mode 100644 index 0000000..28387b0 --- /dev/null +++ b/oldStuff/popup.html @@ -0,0 +1,40 @@ + + + + ClearURLs Add-on + + + + + + + +
+
ClearURLs 1.1.1.4
+
+
+
+ Enable globally:
+ +

+
+
+ Totally blocked elements:
+
+ Percentage of total traffic:
+
+
+ +

+

+ +
+
+
+
+ + \ No newline at end of file diff --git a/oldStuff/popup.js b/oldStuff/popup.js new file mode 100644 index 0000000..7fe6f93 --- /dev/null +++ b/oldStuff/popup.js @@ -0,0 +1,115 @@ +function init() +{ + setStatus(); + changeStatistics(); + setTabcounter(); +} + +function setStatus() +{ + browser.storage.local.get('globalStatus', function(data){ + //Hier neue ID des Mülleimers + var element = $("#globalStatus"); + data = data.globalStatus; + if(data == null){ + browser.storage.local.set({"globalStatus": true}); + } + if(data){ + //Hier neue Enable Classe des Mülleimers + element.removeClass().addClass("status statusEnabled"); + }else{ + //Hier neue Disable Classe des Mülleimers + element.removeClass().addClass("status statusDisabled"); + } + }); +} + +function changeStatus(){ + browser.storage.local.get('globalStatus', function(data){ + //Hier neue ID des Mülleimers + var element = $("#globalStatus"); + data = data.globalStatus; + + if(data){ + browser.storage.local.set({"globalStatus": false}); + //Hier neue Disable Classe des Mülleimers + element.removeClass().addClass("status statusDisabled"); + }else{ + browser.storage.local.set({"globalStatus": true}); + //Hier neue Enable Classe des Mülleimers + element.removeClass().addClass("status statusEnabled"); + } + }); +}; + +/** + * Get the globalCounter value from the browser storage + * @param {(data){} Return value form browser.storage.local.get + */ +function changeStatistics(){ + var element = $("#statistics_value"); + var globalPercentage = $("#statistics_value_global_percentage"); + var globalCounter; + var globalURLCounter; + + browser.storage.local.get('globalCounter', function(data){ + if(data.globalCounter){ + globalCounter = data.globalCounter; + } + else { + globalCounter = 0; + } + + element.text(globalCounter.toLocaleString()); + }); + + browser.storage.local.get('globalURLCounter', function(data){ + if(data.globalURLCounter){ + globalURLCounter = data.globalURLCounter; + } + else { + globalURLCounter = 0; + } + + globalPercentage.text(((globalCounter/globalURLCounter)*100).toFixed(3)+"%"); + }); +}; + +function changeTabcounter() { + var element = $('#tabcounter').is(':checked'); + + browser.storage.local.set({'badgedStatus': element}); +}; + +function setTabcounter() { + var element = $('#tabcounter'); + + browser.storage.local.get('badgedStatus', function(data) { + if(data.badgedStatus) + { + element.prop('checked', true); + } + else if(data.badgedStatus === null || typeof(data.badgedStatus) == "undefined"){ + element.prop('checked', true); + browser.storage.local.set({'badgedStatus': true}); + } + else { + element.prop('checked', false); + } + }); +} + +function resetGlobalCounter(){ + browser.storage.local.set({"globalCounter": 0}); + browser.storage.local.set({"globalURLCounter": 0}); +}; + +$(document).ready(function(){ + init(); + //Hier neue ID des Mülleimers + $("#globalStatus").on("click", changeStatus); + $('.reset_counter_btn').on("click", resetGlobalCounter); + $('#tabcounter').on('change', changeTabcounter); + + browser.storage.onChanged.addListener(changeStatistics); +}); \ No newline at end of file diff --git a/oldStuff/popup_style.css b/oldStuff/popup_style.css new file mode 100644 index 0000000..a07a991 --- /dev/null +++ b/oldStuff/popup_style.css @@ -0,0 +1,145 @@ +body { + margin: 0; + top: 0; + background: #fff; + background: url("img-noise-361x370.png"); + min-width: 180px; + max-width: 180px; + font-family: "Arial"; +} + +img { + display: block; + margin: auto; +} + +#main { + top: 0; + overflow-y: auto; + overflow-x: hidden; + white-space: nowrap; +} + +#content { + display: inline-block; + padding: 10px 10px 20px 10px; + width: calc(100% - 20px); + font-size: 14pt; +} + +.header { + display: block; + background-color: #4a4a4a; + color: #dedede; + font-size: 11pt; + text-align: center; + top: 0; + padding: 2px 0px 2px 0px; + margin: 5px 0px 5px 0px; +} + +#default::after { + content: " "; + clear: both; + display: table; +} + +#global { + width: 50%; +} + +.status { + display: block; + width: 145px; + height: 145px; + margin-top: 10px; + margin-left: 10px; + padding: 0; + background: none; + border: none; +} +.status:hover { + filter: brightness(90%); +} +.statusEnabled { + background-image: url("icon128_o.png"); +} +.statusDisabled { + background-image: url("icon128_g.png"); +} + +.switch { + margin-right: 10px; + width: 50px; + height: 26px; + float: left; + background: none; + border: none; +} + +#statistics { + margin-top: 10px; + font-family: Verdana; + font-size: 0.65em; + float: left; + text-align: left; +} + +.statistics_value { + text-align: right; + float: right; + font-family: Verdana; + color: orange; + font-weight: bold; +} + +#default hr { + width: 1000%; + margin-left: -500%; + border: dotted 1px orange; +} + +.center { + text-align: center; +} + +.reset_counter_btn { + -moz-box-shadow:inset 0px 1px 0px 0px #cf866c; + -webkit-box-shadow:inset 0px 1px 0px 0px #cf866c; + box-shadow:inset 0px 1px 0px 0px #cf866c; + background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #d0451b), color-stop(1, #bc3315)); + background:-moz-linear-gradient(top, #d0451b 5%, #bc3315 100%); + background:-webkit-linear-gradient(top, #d0451b 5%, #bc3315 100%); + background:-o-linear-gradient(top, #d0451b 5%, #bc3315 100%); + background:-ms-linear-gradient(top, #d0451b 5%, #bc3315 100%); + background:linear-gradient(to bottom, #d0451b 5%, #bc3315 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d0451b', endColorstr='#bc3315',GradientType=0); + background-color:#d0451b; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + border:1px solid #942911; + display:inline-block; + cursor:pointer; + color:#ffffff; + font-family:Arial; + font-size:13px; + padding:6px 24px; + text-decoration:none; + text-shadow:0px 1px 0px #854629; + margin-top: 10px; +} +.reset_counter_btn:hover { + background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #bc3315), color-stop(1, #d0451b)); + background:-moz-linear-gradient(top, #bc3315 5%, #d0451b 100%); + background:-webkit-linear-gradient(top, #bc3315 5%, #d0451b 100%); + background:-o-linear-gradient(top, #bc3315 5%, #d0451b 100%); + background:-ms-linear-gradient(top, #bc3315 5%, #d0451b 100%); + background:linear-gradient(to bottom, #bc3315 5%, #d0451b 100%); + filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#bc3315', endColorstr='#d0451b',GradientType=0); + background-color:#bc3315; +} +.reset_counter_btn:active { + position:relative; + top:1px; +} diff --git a/oldStuff/sketch.png b/oldStuff/sketch.png new file mode 100644 index 0000000..2d6a21f Binary files /dev/null and b/oldStuff/sketch.png differ diff --git a/oldStuff/switchDisabled.png b/oldStuff/switchDisabled.png new file mode 100644 index 0000000..ca59c04 Binary files /dev/null and b/oldStuff/switchDisabled.png differ diff --git a/oldStuff/switchEnabled.png b/oldStuff/switchEnabled.png new file mode 100644 index 0000000..cbeb529 Binary files /dev/null and b/oldStuff/switchEnabled.png differ diff --git a/oldStuff/toggle.psd b/oldStuff/toggle.psd new file mode 100644 index 0000000..4da7fa5 Binary files /dev/null and b/oldStuff/toggle.psd differ