From 2163a27b4b7444b4d76a265ad0545dd758398eec Mon Sep 17 00:00:00 2001 From: mally Date: Mon, 13 Sep 2021 04:57:58 +0000 Subject: [PATCH] Upload files to 'addons/code/bcma' --- addons/code/bcma/cf.js | 26 +++----- addons/code/bcma/cg.html | 7 ++- addons/code/bcma/cg.js | 2 +- addons/code/bcma/manifest.json | 108 ++++++++++++++++----------------- 4 files changed, 68 insertions(+), 75 deletions(-) diff --git a/addons/code/bcma/cf.js b/addons/code/bcma/cf.js index edbaa5049b..7141de7bec 100644 --- a/addons/code/bcma/cf.js +++ b/addons/code/bcma/cf.js @@ -12,14 +12,6 @@ let my_cf_collection = [], my_xcs_a1 = false, my_xcs_a2 = false, my_nfo_lang = 'eo'; -const trans = { - 'eo': { - 'detemi': 'Minaco Detektita', - 'cflrmi': 'Cloudflare Detektita', - 'virus': "Atentivelo: Severa\nAgo: Blokita\nDomajno: ", - 'redir': "Redirektu al alternativa URL.\n\nDomajno: " - } -}; function get_realdomain(w) { let wa = w.split('.'); let wa_l = wa.length; @@ -1105,14 +1097,14 @@ function update_icon(tid, url) { }); return; } -function tell_me(ok, mgT, mgD) { +function notify_me(ok, hn) { if (ok) { browser.notifications.clear(infobox); browser.notifications.create(infobox, { 'type': 'basic', 'iconUrl': browser.runtime.getURL('icons/cf_1.png'), - 'title': mgT + ' [' + ((new Date()).toLocaleString()) + ']', - 'message': mgD + 'title': 'Cloudflare! [' + ((new Date()).toLocaleString()) + ']', + 'message': hn }); } } @@ -1178,7 +1170,7 @@ browser.webRequest.onHeadersReceived.addListener(function (wr) { } console.log('BCMA: Block Cloudflare RH', wr_hostname); if (my_action == 0 || my_action == 1) { - tell_me(my_nfo_cfd, trans['eo']['detemi'], trans['eo']['virus'] + wr_hostname); + notify_me(my_nfo_cfd, wr_hostname); if (wr.type == 'image') { return { redirectUrl: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs=' @@ -1190,13 +1182,13 @@ browser.webRequest.onHeadersReceived.addListener(function (wr) { } } if (my_action == 2) { - tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); + notify_me(my_nfo_alu, wr_hostname); return { redirectUrl: 'https://web.archive.org/web/' + wr.url }; } if (my_action == 4) { - tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); + notify_me(my_nfo_alu, wr_hostname); return { redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url)) }; @@ -1239,7 +1231,7 @@ browser.webRequest.onBeforeRequest.addListener(function (wr) { if (cf_is) { console.log('BCMA: Block Cloudflare BR', wr_hostname); if (my_action == 0 || my_action == 1) { - tell_me(my_nfo_cfd, trans['eo']['detemi'], trans['eo']['virus'] + wr_hostname); + notify_me(my_nfo_cfd, wr_hostname); if (wr.type == 'image') { return { redirectUrl: 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgAAACwAAAAAAQABAAACAkQBADs=' @@ -1251,13 +1243,13 @@ browser.webRequest.onBeforeRequest.addListener(function (wr) { } } if (my_action == 2) { - tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); + notify_me(my_nfo_alu, wr_hostname); return { redirectUrl: 'https://web.archive.org/web/' + wr.url }; } if (my_action == 4) { - tell_me(my_nfo_alu, trans['eo']['cflrmi'], trans['eo']['redir'] + wr_hostname); + notify_me(my_nfo_alu, wr_hostname); return { redirectUrl: my_customurl.replace('%%URL%%', wr.url).replace('%%ERL%%', encodeURIComponent(wr.url)) }; diff --git a/addons/code/bcma/cg.html b/addons/code/bcma/cg.html index 2161625475..24752c0015 100644 --- a/addons/code/bcma/cg.html +++ b/addons/code/bcma/cg.html @@ -20,7 +20,7 @@  
 
- 🔔 (Esperanto)
+ 🔔

 
 
@@ -144,14 +144,15 @@ - - + +  
 
📚
 
diff --git a/addons/code/bcma/cg.js b/addons/code/bcma/cg.js index c4a0249e1a..703b893ca2 100644 --- a/addons/code/bcma/cg.js +++ b/addons/code/bcma/cg.js @@ -7,7 +7,7 @@ document.addEventListener('DOMContentLoaded', () => { x.innerText = j[x.getAttribute('transk')]; }); }); - document.getElementById('toolim').href = 'https://sercxi.nnpaefp7pkadbxxkhz2agtbv2a4g5sgo2fbmv3i7czaua354334uqqad.onion/ss/tool_qdb.php?ul=' + r[5]; + document.getElementById('toolim').href = 'https://sercxi.eu.org/ss/tool_qdb.php?ul=' + r[5]; document.getElementById('t').value = JSON.parse(r[0]).join("\n"); document.getElementById('g').value = JSON.parse(r[1]).join("\n"); document.getElementById('vau').value = r[3]; diff --git a/addons/code/bcma/manifest.json b/addons/code/bcma/manifest.json index c5a97451b4..0c7fbaf8b3 100644 --- a/addons/code/bcma/manifest.json +++ b/addons/code/bcma/manifest.json @@ -1,56 +1,56 @@ { - "manifest_version": 2, - "name": "Bloku Cloudflaron MITM-Atakon", - "description": "Submetiĝu al tutmonda gvatado aŭ rezistu", - "version": "1.0.6", - "homepage_url": "http://crimeflare.eu.org/", - "author": "Crimeflare #Addon", - "permissions": [ - "", - "activeTab", - "tabs", - "webRequest", - "webRequestBlocking", - "webNavigation", - "notifications", - "storage", - "unlimitedStorage" - ], - "icons": { - "72": "icons/72.png" - }, - "background": { - "scripts": [ - "cf.js" - ] - }, - "content_scripts": [ - { - "matches": [ - "http://*/*", - "https://*/*" - ], - "js": [ - "cs.js" - ], - "run_at": "document_end" - } - ], - "options_ui": { - "browser_style": true, - "page": "cg.html" - }, - "browser_action": { - "browser_style": true, - "default_icon": { - "32": "icons/cf_0.png" - } - }, - "applications": { - "gecko": { - "id": "bcma@searxes.eu.org", - "strict_min_version": "78.0", - "update_url": "https://api.nnpaefp7pkadbxxkhz2agtbv2a4g5sgo2fbmv3i7czaua354334uqqad.onion/_/addon.php?for=bcma" - } - } + "manifest_version": 2, + "name": "Bloku Cloudflaron MITM-Atakon", + "description": "Submeti\u011du al tutmonda gvatado a\u016d rezistu", + "version": "1.0.7", + "homepage_url": "http://crimeflare.eu.org/", + "author": "Crimeflare", + "permissions": [ + "", + "activeTab", + "tabs", + "webRequest", + "webRequestBlocking", + "webNavigation", + "notifications", + "storage", + "unlimitedStorage" + ], + "icons": { + "72": "icons/72.png" + }, + "background": { + "scripts": [ + "cf.js" + ] + }, + "content_scripts": [ + { + "matches": [ + "http://*/*", + "https://*/*" + ], + "js": [ + "cs.js" + ], + "run_at": "document_end" + } + ], + "options_ui": { + "browser_style": true, + "page": "cg.html" + }, + "browser_action": { + "browser_style": true, + "default_icon": { + "32": "icons/cf_0.png" + } + }, + "applications": { + "gecko": { + "id": "bcma@searxes.eu.org", + "strict_min_version": "78.0", + "update_url": "https://api.sercxi.eu.org/_/addon.php?for=bcma" + } + } } \ No newline at end of file