diff --git a/addons/releases/update_firefox.json b/addons/releases/update_firefox.json index 383a182da5..2683e578f1 100644 --- a/addons/releases/update_firefox.json +++ b/addons/releases/update_firefox.json @@ -9,7 +9,7 @@ } }, "version": "1.0.7.1", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/isat.xpi?20a0236da6d587ecf65ea4c1438e9fc7dcaf046d5fc9b138b2ba4cf65481be15", + "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/isat.xpi", "update_hash": "sha256:20a0236da6d587ecf65ea4c1438e9fc7dcaf046d5fc9b138b2ba4cf65481be15" } ] @@ -23,7 +23,7 @@ } }, "version": "1.0.27", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/ismm.xpi?0854436688e68dbd6c731eb4fc39e1a6dbe97d0b4374c4e8f8a24a889d6a337f", + "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/ismm.xpi", "update_hash": "sha256:0854436688e68dbd6c731eb4fc39e1a6dbe97d0b4374c4e8f8a24a889d6a337f" } ] @@ -37,7 +37,7 @@ } }, "version": "1.0.6.1", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/urjm.xpi?0664ae01e3f13663db95640c55d2ed2406f82800ce276ca4eb3c3e3c501ce297", + "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/urjm.xpi", "update_hash": "sha256:0664ae01e3f13663db95640c55d2ed2406f82800ce276ca4eb3c3e3c501ce297" } ] @@ -51,10 +51,10 @@ } }, "version": "1.0.1.1", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/bcma.xpi?bf5c3cbf48d59073fbbf251d9e04b84b23d4c7b0955ed0896214ab9463ad49b6", + "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/addons/releases/bcma.xpi", "update_hash": "sha256:bf5c3cbf48d59073fbbf251d9e04b84b23d4c7b0955ed0896214ab9463ad49b6" } ] } } -} \ No newline at end of file +} diff --git a/tool/ombrelo/bl/LICENSE b/tool/ombrelo/LICENSE similarity index 100% rename from tool/ombrelo/bl/LICENSE rename to tool/ombrelo/LICENSE diff --git a/tool/ombrelo/bl/addon.xpi b/tool/ombrelo/bl.xpi similarity index 100% rename from tool/ombrelo/bl/addon.xpi rename to tool/ombrelo/bl.xpi diff --git a/tool/ombrelo/bl/cs.js b/tool/ombrelo/bl/cs.js deleted file mode 100644 index d3fd1b6205..0000000000 --- a/tool/ombrelo/bl/cs.js +++ /dev/null @@ -1,192 +0,0 @@ -if (document.body) { - if (['ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion', 'ombrelo.eu.org'].includes(location.hostname)) { - if (location.pathname == '/' || location.pathname == '/a/') { - browser.storage.local.get().then(d => { - let csl = 0, - cs = (function () { - let s = document.createElement('style'); - document.head.appendChild(s); - return s.sheet; - })(); - if (cs) { - let bMain = (location.pathname == '/') ? true : false; - (d.data || '').split("\n").forEach(e => { - if (e.includes('/')) { - e = e.split('/'); - if (bMain) { - if (e[0] == 'f' || e[0] == 'd') { - cs.insertRule("blockquote.seres[data-f*='/" + e[0] + "=" + e[1] + "']{display:none !important}", csl); - csl++; - } - if (e[0] == 'a' || e[0] == 'v') { - cs.insertRule("div#box_result table tr[z" + e[0] + "='" + e[1] + "']{display:none !important}", csl); - csl++; - } - } else { - if (e[0] == 'f' || e[0] == 'd') { - cs.insertRule("div#m table tr[af*='/" + e[0] + "=" + e[1] + "']{display:none !important}", csl); - csl++; - } - } - } - }); - if (d.idn == 'y') { - cs.insertRule((bMain ? "blockquote.seres[data-f*='/d=xn--'],blockquote.seres[data-f*='/f=xn--']{display:none !important}" : "div#m table tr[af*='/d=xn--'],div#m table tr[af*='/f=xn--']{display:none !important}"), csl); - csl++; - } - if (d.mim == 'y') { - cs.insertRule((bMain ? "div#box_result > details blockquote.opmor,blockquote.seres[data-f*='/mitm']{display:none !important}" : "div#m > details,tr td.cf{display:none !important}"), csl); - csl++; - } - if (bMain) { - if (d.sex == 'y') { - cs.insertRule("blockquote.seres[data-f*='/nsfw']{display:none !important}", csl); - csl++; - } - if (d.att == 'y') { - cs.insertRule("blockquote.seres[data-f*='/att']{display:none !important}", csl); - csl++; - } - if (document.getElementById('box_result')) { - (new MutationObserver(i => { - document.querySelectorAll("blockquote.seres[data-f] span.poitu.banME").forEach(j => { - if (j.dataset.done != 1) { - j.removeAttribute('onclick'); - j.addEventListener('click', k => { - let kB = (k.target).parentNode.parentNode; - let f = kB.dataset.f.split('/f=', 2)[1].split('/', 2)[0]; - if (f.length >= 4) { - browser.storage.local.get(['data']).then(d => { - let od = (d.data || '').split("\n").filter(x => x != ''); - od.push('f/' + f); - browser.storage.local.set({ - 'data': od.sort().filter((v, i, a) => a.indexOf(v) === i).filter(x => x != '').join("\n") - }).then(() => { - cs.insertRule("blockquote.seres[data-f*='/f=" + f + "']{display:none !important}", csl); - csl++; - }, () => {}); - }, () => {}); - } - }); - j.dataset.done = 1; - } - }); - document.querySelectorAll("table tr[za][zv] span.poitu.banME").forEach(j => { - if (j.dataset.done != 1) { - j.removeAttribute('onclick'); - j.addEventListener('click', k => { - let f = (k.target).parentNode.parentNode.parentNode.getAttribute('za'); - if (f.length >= 3) { - browser.storage.local.get(['data']).then(d => { - let od = (d.data || '').split("\n").filter(x => x != ''); - od.push('a/' + f); - browser.storage.local.set({ - 'data': od.sort().filter((v, i, a) => a.indexOf(v) === i).filter(x => x != '').join("\n") - }).then(() => { - cs.insertRule("div#box_result table tr[za='" + f + "']{display:none !important}", csl); - csl++; - }, () => {}); - }, () => {}); - } - }); - j.dataset.done = 1; - } - }); - })).observe(document.getElementById('box_result'), { - childList: true, - subtree: true - }); - } - } else { - if (document.getElementById('m')) { - document.querySelectorAll("div#m table tr[af] span.u").forEach(j => { - if (j.dataset.done != 1) { - j.removeAttribute('onclick'); - j.addEventListener('click', k => { - let f = (k.target).parentNode.parentNode.getAttribute('af').split('/f=', 2)[1]; - if (f.length >= 4) { - browser.storage.local.get(['data']).then(d => { - let od = (d.data || '').split("\n").filter(x => x != ''); - od.push('f/' + f); - browser.storage.local.set({ - 'data': od.sort().filter((v, i, a) => a.indexOf(v) === i).filter(x => x != '').join("\n") - }).then(() => { - cs.insertRule("div#m table tr[af*='/f=" + f + "']{display:none !important}", csl); - csl++; - }, () => {}); - }, () => {}); - } - }); - j.dataset.done = 1; - } - }); - } - } - } - }, () => {}); - } - } else { - if (location.href.endsWith('/edit.html')) { - document.addEventListener('DOMContentLoaded', () => { - browser.storage.local.get().then(d => { - fetch('i18n/' + (d.ul || 'eo') + '.json', { - method: 'GET' - }).then(j => j.json()).then(j => { - document.querySelectorAll('span[transk]').forEach(x => { - x.innerText = j[x.getAttribute('transk')]; - }); - }); - document.getElementById('bl').value = d.data || ''; - document.getElementById('haidn').checked = (d.idn == 'y') ? true : false; - document.getElementById('hamim').checked = (d.mim == 'y') ? true : false; - document.getElementById('hasex').checked = (d.sex == 'y') ? true : false; - document.getElementById('haatt').checked = (d.att == 'y') ? true : false; - }, () => {}); - document.getElementById('save').addEventListener('click', () => { - document.getElementById('bl').style.display = 'none'; - let data = document.getElementById('bl').value.split("\n"), - newdata = []; - data.forEach(d => { - if (/^(f|d|a|v)\/([a-zA-Z0-9._-]{3,255})$/.test(d)) { - newdata.push(d); - } - }); - browser.storage.local.set({ - 'data': newdata.sort().filter((v, i, a) => a.indexOf(v) === i).filter(x => x != '').join("\n") - }).then(() => { - location.reload(true); - }, () => {}); - }); - document.getElementById('haidn').addEventListener('click', () => { - browser.storage.local.set({ - 'idn': (document.getElementById('haidn').checked ? 'y' : 'n') - }); - }); - document.getElementById('hamim').addEventListener('click', () => { - browser.storage.local.set({ - 'mim': (document.getElementById('hamim').checked ? 'y' : 'n') - }); - }); - document.getElementById('hasex').addEventListener('click', () => { - browser.storage.local.set({ - 'sex': (document.getElementById('hasex').checked ? 'y' : 'n') - }); - }); - document.getElementById('haatt').addEventListener('click', () => { - browser.storage.local.set({ - 'att': (document.getElementById('haatt').checked ? 'y' : 'n') - }); - }); - document.getElementById('myul').addEventListener('change', () => { - if (document.getElementById('myul').value != '') { - browser.storage.local.set({ - 'ul': document.getElementById('myul').value - }).then(() => { - location.reload(true); - }); - } - }); - }); - } - } -} \ No newline at end of file diff --git a/tool/ombrelo/bl/edit.html b/tool/ombrelo/bl/edit.html deleted file mode 100644 index 607a110148..0000000000 --- a/tool/ombrelo/bl/edit.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - -
-
- 
-:
-	f/FQDN
-		
-		: f/www.ekzemplo.com
-		: f/ekzemplo.net
-	d/
-		
-		: d/ekzemplo.org
-	a/
-		
-		: a/NeForgEsuAlklAkiAmasButOn0N
-	v/
-		
-		: v/FiLmO
-
-
-
-
-
-
-  
-
- -  
 
- 💬 Internacio
- - - - \ No newline at end of file diff --git a/tool/ombrelo/design/addon.xpi b/tool/ombrelo/design.xpi similarity index 100% rename from tool/ombrelo/design/addon.xpi rename to tool/ombrelo/design.xpi diff --git a/tool/ombrelo/design/LICENSE b/tool/ombrelo/design/LICENSE deleted file mode 100644 index 9be4d1827a..0000000000 --- a/tool/ombrelo/design/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Crimeflare - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/tool/ombrelo/design/cs.js b/tool/ombrelo/design/cs.js deleted file mode 100644 index 381d0d2fa5..0000000000 --- a/tool/ombrelo/design/cs.js +++ /dev/null @@ -1,20 +0,0 @@ -if (document.body && ['ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion', 'ombrelo.eu.org'].includes(location.hostname)) { - if (location.pathname == '/' && document.querySelectorAll("link[rel=stylesheet][href^='./oocss/']").length == 1) { - browser.storage.local.get(['fcss']).then(d => { - if (d.fcss && d.fcss.length > 0) { - let csl = 0, - cs = (function () { - let s = document.createElement('style'); - document.head.appendChild(s); - return s.sheet; - })(); - if (cs) { - d.fcss.forEach(x => { - cs.insertRule(x, csl); - csl++; - }); - } - } - }, () => {}); - } -} \ No newline at end of file diff --git a/tool/ombrelo/design/dt.js b/tool/ombrelo/design/dt.js deleted file mode 100644 index 8af1d49f29..0000000000 --- a/tool/ombrelo/design/dt.js +++ /dev/null @@ -1,347 +0,0 @@ -let mul, csserr = ''; -function chgmenu(z) { - document.querySelectorAll('div[id^=submu_]').forEach(x => { - x.style.display = (x.id.replace('submu_', '') == z) ? 'block' : 'none'; - }); - document.querySelectorAll('button[id^=chgmu_]').forEach(x => { - x.disabled = (x.id.replace('chgmu_', '') == z) ? true : false; - }); - if (z == 13) { - browser.browsingData.removeCache({}); - } -} -function savekv(k, v) { - browser.storage.local.set({ - [k]: v - }); -} -function saveme() { - document.body.style.display = 'none'; - browser.browsingData.removeCache({}); - let junk = '', - mycss = []; - junk = document.querySelector("input[type=radio][name='stp1_1']:checked").value; - savekv('stp1_1', (['0', 'c', 'cr', 'tr'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_1_1').value.length == 7) { - mycss.push("body#webpage,form#msf{background-color:" + document.getElementById('iact_1_1').value + "}"); - } - if (junk == 'cr') { - mycss.push("body{background-position:center center;background-repeat:no-repeat;background-attachment:fixed;background-size:cover;background-image:url(https://ombrelo.eu.org/dosiero/bildo/ekranfono)}"); - } - if (junk == 'tr') { - mycss.push("body{background-position:center center;background-repeat:no-repeat;background-attachment:fixed;background-size:cover;background-image:url(http://ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion/dosiero/bildo/ekranfono)}"); - } - junk = document.querySelector("input[type=radio][name='stp1_2']:checked").value; - savekv('stp1_2', (['0', 'y'].includes(junk) ? junk : '0')); - if (junk == 'y') { - mycss.push("hr{opacity:0}"); - } - junk = document.querySelector("input[type=radio][name='stp2_1']:checked").value; - savekv('stp2_1', (['0', 'c', 'bl'].includes(junk) ? junk : '0')); - if (junk == 'bl') { - mycss.push("span#srchbox,input#qbar.srch_input{background:black}"); - mycss.push("span#srchbox input[type=image]{filter:invert(1)}"); - } - if (junk == 'c' && document.getElementById('iact_2_1').value.length == 7) { - mycss.push("span#srchbox,input#qbar.srch_input{background:" + document.getElementById('iact_2_1').value + "}"); - mycss.push("span#srchbox input[type=image]{display:none}"); - } - junk = document.querySelector("input[type=radio][name='stp2_2']:checked").value; - savekv('stp2_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_2_2').value.length == 7) { - mycss.push("span#srchbox{border:1px solid " + document.getElementById('iact_2_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp2_3']:checked").value; - savekv('stp2_3', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_2_3').value.length == 7) { - mycss.push("input#qbar.srch_input{color:" + document.getElementById('iact_2_3').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp3_1']:checked").value; - savekv('stp3_1', (['0', 'y'].includes(junk) ? junk : '0')); - if (junk == 'y') { - mycss.push("span#srchbox input[type=image],img#clrme{display:none}"); - } - junk = document.querySelector("input[type=radio][name='stp3_2']:checked").value; - savekv('stp3_2', (['0', 'y'].includes(junk) ? junk : '0')); - if (junk == 'y') { - mycss.push("div#ctbx details img,img#clrme{filter:invert(1)}"); - } - junk = document.querySelector("input[type=radio][name='stp4_1']:checked").value; - savekv('stp4_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_4_1').value.length == 7) { - mycss.push("select.srch_input{background:" + document.getElementById('iact_4_1').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp4_2']:checked").value; - savekv('stp4_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_4_2').value.length == 7) { - mycss.push("select.srch_input{color:" + document.getElementById('iact_4_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp5_1']:checked").value; - savekv('stp5_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_5_1').value.length == 7) { - mycss.push("table#cats td label.lbon,table#cats td label.lbon:hover{background:" + document.getElementById('iact_5_1').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp5_2']:checked").value; - savekv('stp5_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_5_2').value.length == 7) { - mycss.push("table#cats td label.lbon{color:" + document.getElementById('iact_5_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp6_1']:checked").value; - savekv('stp6_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_6_1').value.length == 7) { - mycss.push("table#cats td label:not(.lbon):hover{background:" + document.getElementById('iact_6_1').value + " !important}") - mycss.push("table#cats td label,table#cats td summary{background:" + document.getElementById('iact_6_1').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp6_2']:checked").value; - savekv('stp6_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_6_2').value.length == 7) { - mycss.push("table#cats td label,table#cats td summary{color:" + document.getElementById('iact_6_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp6_3']:checked").value; - savekv('stp6_3', (['0', 'y'].includes(junk) ? junk : '0')); - if (junk == 'y') { - mycss.push("form#msf:not(:hover) span#scjs{display:unset !important}"); - } - junk = document.querySelector("input[type=radio][name='stp6_4']:checked").value; - savekv('stp6_4', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_6_4').value.length == 7) { - mycss.push("form#msf{background:" + document.getElementById('iact_6_4').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp7_1']:checked").value; - savekv('stp7_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_7_1').value.length == 7) { - mycss.push("blockquote.nfobox{border:1px solid " + document.getElementById('iact_7_1').value + " !important}"); - } - junk = document.querySelector("input[type=radio][name='stp7_2']:checked").value; - savekv('stp7_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_7_2').value.length == 7) { - mycss.push("span.sx_tx{color:" + document.getElementById('iact_7_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp8_1']:checked").value; - savekv('stp8_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_8_1').value.length == 7) { - mycss.push("a:not(.ind),details summary{color:" + document.getElementById('iact_8_1').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp8_2']:checked").value; - savekv('stp8_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_8_2').value.length == 7) { - mycss.push("a:not(.ind):hover,details summary:hover{color:" + document.getElementById('iact_8_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp9_1']:checked").value; - savekv('stp9_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_9_1').value.length == 7) { - mycss.push("span.sx_l,span.sx_l2{color:" + document.getElementById('iact_9_1').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp10_1']:checked").value; - savekv('stp10_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_10_1').value.length == 7) { - mycss.push("span.sx_d,a.ind{color:" + document.getElementById('iact_10_1').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp10_2']:checked").value; - savekv('stp10_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_10_2').value.length == 7) { - mycss.push("a:not(.mitm) > span.marker{text-decoration:underline " + document.getElementById('iact_10_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp11_1']:checked").value; - savekv('stp11_1', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_11_1').value.length == 7) { - mycss.push("blockquote.seres,blockquote.seres:not(:hover){background:" + document.getElementById('iact_11_1').value + "}"); - mycss.push("hr.dotd{border:1px solid " + document.getElementById('iact_11_1').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp11_2']:checked").value; - savekv('stp11_2', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_11_2').value.length == 7) { - mycss.push("blockquote.seres,blockquote.seres:not(:hover){border:1px solid " + document.getElementById('iact_11_2').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp11_3']:checked").value; - savekv('stp11_3', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_11_3').value.length == 7) { - mycss.push("blockquote.seres:hover{background:" + document.getElementById('iact_11_3').value + "}"); - mycss.push("blockquote.seres:hover hr.dotd{border:1px solid " + document.getElementById('iact_11_3').value + "}"); - } - junk = document.querySelector("input[type=radio][name='stp11_4']:checked").value; - savekv('stp11_4', (['0', 'c'].includes(junk) ? junk : '0')); - if (junk == 'c' && document.getElementById('iact_11_4').value.length == 7) { - mycss.push("blockquote.seres:hover{border:1px solid " + document.getElementById('iact_11_4').value + "}"); - } - document.querySelectorAll('input[type=color][id^=iact_]').forEach(t => { - savekv(t.id.replace('iact_', 'clrvar_'), (t.value.length == 7 ? t.value : '#ffffff')); - }); - let isbad = false, - utest; - junk = document.getElementById('stp12_css').value.split("\n").filter(v => v != ''); - junk.forEach(t => { - t = t.toLowerCase().replace('"', "'").replace("\t", ' ').trim(); - if (!/^(.*)\{(.*)\}$/.test(t) || t.includes('[]') || t.includes('scri') || t.includes('url(') || t.includes('//')) { - isbad = true; - console.log('!', t); - } - t = t.split('{')[0]; - try { - utest = document.querySelectorAll(t); - utest = document.querySelectorAll("a," + t + ",b"); - } catch (u) { - isbad = true; - console.log('!', u); - } - }); - if (!isbad) { - savekv('stp12_css', junk.join("\n")); - junk.forEach(x => { - mycss.push(x); - }); - } else { - alert(csserr); - } - savekv('fcss', mycss); - document.body.style.display = 'block'; -} -document.addEventListener('DOMContentLoaded', function () { - if (location.search != '?ss') { - browser.tabs.query({ - active: true, - currentWindow: true - }).then(t => { - if (t[0]) { - browser.tabs.update(t[0].id, { - active: true, - url: browser.runtime.getURL('dt.html?ss') - }); - } - }, () => {}); - } - document.body.bgColor = '#f9f9fa'; - document.querySelectorAll('div[id^=submu_]').forEach(x => { - if (x.id != 'submu_99') { - x.style.display = 'none'; - } - }); - document.querySelectorAll('map area[id^=chgma_]').forEach(x => { - let xi = x.id.replace('chgma_', ''); - x.addEventListener('click', (y) => { - y.preventDefault(); - chgmenu(xi); - }); - }); - document.querySelectorAll('button[id^=chgmu_]').forEach(x => { - let xi = x.id.replace('chgmu_', ''); - x.addEventListener('click', () => { - chgmenu(xi); - }); - }); - document.querySelectorAll('input[type=color][id^=iact_]').forEach(x => { - let xi = x.id.replace('iact_', 'stp'); - x.addEventListener('click', () => { - document.querySelector('input[type=radio][name=' + xi + '][value=c]').checked = true; - }); - }); - browser.storage.local.get().then(d => { - if (d.stp1_1 != undefined) { - Object.keys(d).forEach(x => { - if (x.startsWith('clrvar_') || x == 'stp12_css') { - document.getElementById(x.replace('clrvar_', 'iact_')).value = d[x]; - } - if (x.startsWith('stp') && x != 'stp12_css') { - if (document.querySelector("input[type=radio][name='" + x + "'][value='" + d[x] + "']")) { - document.querySelector("input[type=radio][name='" + x + "'][value='" + d[x] + "']").checked = true; - } - } - }); - } - fetch('i18n/' + (d.ul || 'eo') + '.json', { - method: 'GET' - }).then(j => j.json()).then(j => { - document.querySelectorAll('span[transk]').forEach(x => { - x.innerText = j[x.getAttribute('transk')]; - }); - mul = d.ul || 'eo'; - csserr = j['er1']; - }); - }, () => {}); - document.body.style.display = 'block'; - document.getElementById('impfile').addEventListener('change', function (ev) { - let fr = new FileReader(); - fr.onload = function () { - let junk = fr.result; - if (junk.startsWith('{') && junk.endsWith('}')) { - junk = JSON.parse(junk); - if (junk.fcss != undefined) { - Object.keys(junk).forEach(x => { - savekv(x, junk[x]); - }); - } - browser.browsingData.removeCache({}); - location.reload(true); - } - } - fr.readAsText(ev.target.files[0]); - }); - document.getElementById('bt_save').addEventListener('click', () => { - document.documentElement.style.animation = null; - document.documentElement.offsetHeight; - saveme(); - document.documentElement.style.animation = 'yfr 0.3s 1'; - }); - document.getElementById('bt_reld').addEventListener('click', () => { - location.reload(true); - }); - document.getElementById('bt_rst').addEventListener('click', () => { - browser.storage.local.clear().then(() => { - browser.storage.local.set({ - 'ul': mul - }).then(() => { - location.reload(true); - }); - }); - }); - document.getElementById('bt_opwc').addEventListener('click', () => { - browser.tabs.create({ - active: true, - url: 'https://ombrelo.eu.org/' - }); - }); - document.getElementById('bt_opwt').addEventListener('click', () => { - browser.tabs.create({ - active: true, - url: 'http://ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion/' - }); - }); - document.getElementById('bt_opwg').addEventListener('click', () => { - browser.tabs.create({ - active: true, - url: 'http://ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion/oo/desegno/#ul=' + mul - }); - }); - document.getElementById('bt_exp').addEventListener('click', () => { - browser.storage.local.get().then(d => { - delete d.ul; - let tmpFile, tmpDL; - tmpFile = new Blob([JSON.stringify(d)], { - type: 'text/plain' - }); - tmpDL = document.createElement('a'); - tmpDL.download = 'mia.json'; - tmpDL.href = window.URL.createObjectURL(tmpFile); - tmpDL.style.display = 'none'; - document.body.appendChild(tmpDL); - tmpDL.click(); - }, () => {}); - }); - document.getElementById('bt_imp').addEventListener('click', () => { - document.getElementById('impfile').click(); - }); - document.getElementById('myul').addEventListener('change', () => { - if (document.getElementById('myul').value != '') { - browser.storage.local.set({ - 'ul': document.getElementById('myul').value - }).then(() => { - location.reload(true); - }); - } - }); - document.addEventListener('contextmenu', function (z) { - if (z.target.tagName != 'TEXTAREA') { - z.preventDefault(); - } - }); -}); \ No newline at end of file diff --git a/tool/ombrelo/search/addon.xpi b/tool/ombrelo/search.xpi similarity index 100% rename from tool/ombrelo/search/addon.xpi rename to tool/ombrelo/search.xpi diff --git a/tool/ombrelo/search/LICENSE b/tool/ombrelo/search/LICENSE deleted file mode 100644 index 9be4d1827a..0000000000 --- a/tool/ombrelo/search/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Crimeflare - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/tool/ombrelo/search/cg.js b/tool/ombrelo/search/cg.js deleted file mode 100644 index ecb5d58ff5..0000000000 --- a/tool/ombrelo/search/cg.js +++ /dev/null @@ -1,17 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - browser.storage.local.get(['onion']).then(g => { - if (g.onion == 'y') { - document.getElementById('ut1').checked = true; - document.getElementById('ut2').checked = false; - } else { - document.getElementById('ut1').checked = false; - document.getElementById('ut2').checked = true; - } - }); - document.getElementById('ut1').addEventListener('click', () => { - browser.runtime.sendMessage(['onion', true]); - }); - document.getElementById('ut2').addEventListener('click', () => { - browser.runtime.sendMessage(['onion', false]); - }); -}); diff --git a/tool/ombrelo/search/s.js b/tool/ombrelo/search/s.js deleted file mode 100644 index 1bfd996791..0000000000 --- a/tool/ombrelo/search/s.js +++ /dev/null @@ -1,101 +0,0 @@ -let baseURL = 'http://ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion/', - uChoices = ''; -const BUclear = 'https://ombrelo.eu.org/', - BUonion = 'http://ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion/'; -browser.storage.local.get(null).then(g => { - baseURL = (g.onion == 'y') ? BUonion : BUclear; - uChoices = g.params || ''; -}); -browser.webRequest.onBeforeRequest.addListener(g => { - if (g.method != 'GET' || g.type != 'main_frame' || g.parentFrameId != -1 || g.documentUrl != undefined || g.frameId != 0) { - return { - cancel: true - }; - } - let tmp; - if (g.url.startsWith('https://ombrelo.test/?q=')) { - let q = (new URL(g.url)).searchParams.get('q'); - if (q.length >= 2) { - let htmlChoices = ''; - uChoices.split('&').forEach(akv => { - if (akv.includes('=')) { - tmp = akv.split('='); - htmlChoices += ''; - } - }); - browser.tabs.create({ - active: true, - openerTabId: g.tabId, - url: 'about:blank' - }).then(t => { - browser.tabs.remove(g.tabId); - browser.tabs.executeScript(t.id, { - matchAboutBlank: true, - code: "document.documentElement.innerHTML='🏤
" + htmlChoices + "
';window.stop();" + - "document.getElementById('f').action='" + baseURL + "';" + - "document.getElementById('q').value=decodeURIComponent(atob('" + - btoa(encodeURIComponent(q).replace(/%([0-9A-F]{2})/g, function (match, p1) { - return String.fromCharCode(parseInt(p1, 16)) - })) + - "').split('').map(function(c){return '%'+('00'+c.charCodeAt(0).toString(16)).slice(-2);}).join(''));" + - "document.getElementById('f').submit();" - }); - }); - return { - cancel: true - }; - } - } - if (g.url.startsWith('https://ombrelo.test/config,' + ((new Date()).toISOString().slice(0, 10).replace(/-/g, '')) + '!!') && /^http(:\/\/ombrelo\.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid\.onion|s:\/\/ombrelo\.eu\.org)\//.test(g.originUrl)) { - let ok = true, - conf = atob(g.url.split('!!')[1]); - if (!/^http(:\/\/ombrelo\.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid\.onion|s:\/\/ombrelo\.eu\.org)\/\?oo\&(.*)rq=%s$/.test(conf)) { - ok = false; - } - if (ok) { - tmp = conf.split('?oo&')[0]; - if (tmp == BUclear || tmp == BUonion) { - baseURL = tmp; - } else { - ok = false; - } - } - if (ok) { - tmp = (conf.split('/?oo')[1]).replace('&rq=%s', ''); - if (tmp.length == 0) { - uChoices = ''; - } else { - if (!/^\&([a-zA-Z0-9&=-]{4,})$/.test(tmp) || tmp.endsWith('&') || tmp.includes('&rq=') || tmp.includes('&&')) { - ok = false; - } else { - uChoices = tmp; - } - } - } - if (ok) { - browser.storage.local.set({ - 'onion': (baseURL == BUonion ? 'y' : 'n') - }); - browser.storage.local.set({ - 'params': uChoices - }); - return { - redirectUrl: conf.replace('rq=%s', 'rq').replace('/?oo&rq', '/') - }; - } - } - return { - cancel: true - }; -}, { - urls: ['https://ombrelo.test/*'] -}, ['blocking']); -browser.runtime.onMessage.addListener((r, s, sr) => { - if (r && r[0] == 'onion') { - browser.storage.local.set({ - 'onion': (r[1] ? 'y' : 'n') - }); - baseURL = (r[1]) ? BUonion : BUclear; - } - return; -}); \ No newline at end of file diff --git a/tool/ombrelo/stats/addon.xpi b/tool/ombrelo/stats.xpi similarity index 100% rename from tool/ombrelo/stats/addon.xpi rename to tool/ombrelo/stats.xpi diff --git a/tool/ombrelo/stats/LICENSE b/tool/ombrelo/stats/LICENSE deleted file mode 100644 index 9be4d1827a..0000000000 --- a/tool/ombrelo/stats/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) Crimeflare - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/tool/ombrelo/stats/cg.js b/tool/ombrelo/stats/cg.js deleted file mode 100644 index 7389a728e4..0000000000 --- a/tool/ombrelo/stats/cg.js +++ /dev/null @@ -1,48 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - browser.storage.local.get(['ul']).then((r) => { - fetch('i18n/' + (r.ul || 'eo') + '.json', { - method: 'GET' - }).then(j => j.json()).then(j => { - document.querySelectorAll('span[transk]').forEach(x => { - x.innerText = j[x.getAttribute('transk')]; - }); - }); - }); - document.getElementById('crs').addEventListener('click', () => { - browser.storage.local.set({ - 'g': 0 - }); - browser.storage.local.set({ - 'b': 0 - }); - location.reload(); - }); - document.getElementById('sms').addEventListener('click', () => { - document.getElementById('smsa').style.display = 'none'; - browser.storage.local.get(['g', 'b']).then(x => { - let iY = x.g || 0, - iN = x.b || 0, - iT; - iT = iY + iN; - if (iT > 0) { - document.getElementById('viry').innerText = iY + ' (' + (iY * 100 / iT).toFixed(1) + '%)'; - document.getElementById('virn').innerText = iN + ' (' + (iN * 100 / iT).toFixed(1) + '%)'; - document.getElementById('viro').innerText = iT; - } else { - document.getElementById('viry').innerText = 0; - document.getElementById('virn').innerText = 0; - document.getElementById('viro').innerText = 0; - } - document.getElementById('smsb').style.display = 'inline'; - }); - }); - document.getElementById('myul').addEventListener('change', () => { - if (document.getElementById('myul').value != '') { - browser.storage.local.set({ - 'ul': document.getElementById('myul').value - }).then(() => { - location.reload(true); - }); - } - }); -}); \ No newline at end of file diff --git a/tool/ombrelo/stats/cs.js b/tool/ombrelo/stats/cs.js deleted file mode 100644 index dfd1601286..0000000000 --- a/tool/ombrelo/stats/cs.js +++ /dev/null @@ -1,52 +0,0 @@ -if (document.body && ['ombrelo.x66j7jej74efeulffzy3hu3p4dtfruiwb3vv6ec7b5bxlkogxw5vnpid.onion', 'ombrelo.eu.org'].includes(location.hostname) && location.pathname == '/') { - let iY = 0, - iN = 0, - iRUN = false; - function update_stat() { - let iTTL = document.querySelectorAll("div#box_result blockquote.seres[data-f^='/d']").length; - let iNCF = document.querySelectorAll("div#box_result blockquote.seres[data-f^='/d']:not([data-f*='/mitm'])").length; - let iICF = document.querySelectorAll("div#box_result blockquote.seres[data-f^='/d'][data-f*='/mitm']").length; - if (iTTL > 0 && (iNCF + iICF) == iTTL) { - iY += iNCF; - browser.storage.local.set({ - 'g': iY - }); - iN += iICF; - browser.storage.local.set({ - 'b': iN - }); - } - if (iTTL > 0 && (iY > 0 || iN > 0) && document.querySelectorAll('div#box_extinfo span.sx_tx small').length > 0) { - document.querySelector('div#box_extinfo span.sx_tx small').innerHTML = document.querySelector('div#box_extinfo span.sx_tx small').innerHTML + '
  ⮩ MITM: ' + (iN * 100 / (iY + iN)).toFixed(1) + '%'; - } - } - if (document.getElementById('box_result')) { - browser.storage.local.get(['g', 'b']).then(x => { - iY = x.g || 0; - iN = x.b || 0; - update_stat(); - if (document.getElementById('box_result')) { - (new MutationObserver(i => { - if (document.querySelectorAll('div#box_result blockquote.seres.nfobox').length == 1 && document.querySelectorAll('div#box_result blockquote.seres').length == 1) { - iRUN = true; - return; - } - if (document.querySelectorAll("div#box_result blockquote#empage").length > 0) { - iRUN = false; - return; - } - if (document.querySelectorAll("div#box_result blockquote.seres[data-f^='/d']").length == 0) { - iRUN = false; - return; - } - if (iRUN) { - update_stat(); - } - iRUN = false; - })).observe(document.getElementById('box_result'), { - childList: true - }); - } - }); - } -} diff --git a/tool/ombrelo/update_firefox.json b/tool/ombrelo/update_firefox.json index f2a1f2b463..a1e4801ec9 100644 --- a/tool/ombrelo/update_firefox.json +++ b/tool/ombrelo/update_firefox.json @@ -9,7 +9,7 @@ } }, "version": "1.0.5", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/tool/ombrelo/stats/addon.xpi?b70a2a6c26920359c25c6353569ea8a94bfb316a1fb92407c33f7a61d4090f82", + "update_link": "https://0xacab.org/my-privacy-dns/deCloudflare/-/raw/master/tool/ombrelo/stats.xpi", "update_hash": "sha256:b70a2a6c26920359c25c6353569ea8a94bfb316a1fb92407c33f7a61d4090f82" } ] @@ -23,7 +23,7 @@ } }, "version": "1.0.10", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/tool/ombrelo/design/addon.xpi?8666f6b356ee78140fc5c5400a7e02e6c73668ca109aa4d6fe9b694d761d04fc", + "update_link": "https://0xacab.org/my-privacy-dns/deCloudflare/-/raw/master/tool/ombrelo/design.xpi", "update_hash": "sha256:8666f6b356ee78140fc5c5400a7e02e6c73668ca109aa4d6fe9b694d761d04fc" } ] @@ -37,7 +37,7 @@ } }, "version": "1.0.8", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/tool/ombrelo/search/addon.xpi?053847a0a408fc2d174a44632c56cc038e682b9f22bb1363c1e2df172f1dd067", + "update_link": "https://0xacab.org/my-privacy-dns/deCloudflare/-/raw/master/tool/ombrelo/search.xpi", "update_hash": "sha256:053847a0a408fc2d174a44632c56cc038e682b9f22bb1363c1e2df172f1dd067" } ] @@ -51,10 +51,10 @@ } }, "version": "1.0.14", - "update_link": "https://framagit.org/dCF/deCloudflare/-/raw/master/tool/ombrelo/bl/addon.xpi?06a8712ed028717eea041c778483d07ee1b664ff6d683b50d6e5489b1355e126", + "update_link": "https://0xacab.org/my-privacy-dns/deCloudflare/-/raw/master/tool/ombrelo/bl.xpi", "update_hash": "sha256:06a8712ed028717eea041c778483d07ee1b664ff6d683b50d6e5489b1355e126" } ] } } -} \ No newline at end of file +}