From d4dd1024c72c08583cc5f9b17090ed6ea991f47e Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Mon, 28 Sep 2020 20:43:29 +0200 Subject: [PATCH] Add Westdeutsche Allgemeine Zeitung --- README.md | 5 +++-- background.js | 2 ++ contentScript.js | 15 ++++++++++++++- lp/manifest.json | 3 ++- manifest.json | 2 +- options.html | 2 +- popup.html | 4 ++-- sites.js | 1 + 8 files changed, 26 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 650e8af8..fb21d57a 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,8 @@ So don't update to Firefox 79 or use F-droid's [Fennec-release](https://f-droid. [Die Zeit](https://www.zeit.de) - [Frankfurter Allgemeine Zeitung](https://www.faz.net) - [Handelsblatt](https://www.handelsblatt.com) - -[Süddeutsche Zeitung](https://www.sueddeutsche.de) +[Süddeutsche Zeitung](https://www.sueddeutsche.de) - +[Westdeutsche Allgemeine Zeitung](https://www.waz.de) ##### Italy [Corriere Della Sera](https://www.corriere.it) - [Domani](https://editorialedomani.it) - @@ -344,7 +345,7 @@ Also you can enable Googlebot user-agent or disable Javascript for (sub)domain(s * If a site doesn't work try turning off uBlock and refreshing. * Make sure the (new) site is checked under Options. * You will be logged out for most of the sites you have checked. -* If you live in the EU, also consider installing the extension [I don't care about cookies](https://addons.mozilla.org/en-US/firefox/addon/i-dont-care-about-cookies) in order to remove cookie warnings. +* If you live in the EU, also consider installing the extension [I don't care about cookies](https://addons.mozilla.org/en-US/firefox/addon/i-dont-care-about-cookies) in order to remove cookie warnings (or use filter Easylist Cookies/[I don't care about cookies custom filter](https://www.i-dont-care-about-cookies.eu/abp) in uBlock Origin). ### Changelog-releases diff --git a/background.js b/background.js index 26e66890..7a0a6e40 100644 --- a/background.js +++ b/background.js @@ -79,6 +79,7 @@ var allow_cookies = [ 'variety.com', 'volkskrant.nl', 'washingtonpost.com', +'waz.de', 'worldpoliticsreview.com', 'zeit.de', ] @@ -231,6 +232,7 @@ var blockedRegexes = { 'variety.com': /cdn\.cxense\.com/, 'washingtonpost.com': /.+\.washingtonpost\.com\/dr\/resources\/dist\/washpost\/pwapi-proxy\.min\.js/, 'watoday.com.au': /cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js/, +'waz.de': /(.+\.tinypass\.com\/.+|cdn\.cxense\.com)/, 'wsj.com': /(cdn\.ampproject\.org\/v\d\/amp-access-.+\.js|cdn\.cxense\.com)/ }; diff --git a/contentScript.js b/contentScript.js index 8bce7714..0aff6953 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3,7 +3,7 @@ var ext_api = (typeof browser === 'object') ? browser : chrome; var domain; // clean local storage of sites (with an exemption for hold-list) -var arr_localstorage_hold = ['nknews.org', 'seekingalpha.com', 'sfchronicle.com']; +var arr_localstorage_hold = ['elmundo.es', 'nknews.org', 'seekingalpha.com', 'sfchronicle.com', 'waz.de']; if (!matchDomain(arr_localstorage_hold)){ window.localStorage.clear(); } @@ -1128,6 +1128,14 @@ else if (matchDomain("stocknews.com")) { blurmes[i].setAttribute('id', 'blurmenot' + i); } +else if (matchDomain("waz.de")) { + let obfuscated_elems = document.querySelectorAll('.obfuscated'); + for (let obfuscated_elem of obfuscated_elems) { + obfuscated_elem.classList.remove('obfuscated'); + obfuscated_elem.innerHTML = deobfuscateFUNKE(obfuscated_elem.innerText); + } +} + // General Functions function removeDOMElement(...elements) { for (let element of elements) { @@ -1201,3 +1209,8 @@ function parseHtmlEntities(encodedString) { return String.fromCharCode(num); }); } + +function deobfuscateFUNKE(str) { + return str.replace(/[0-9A-ZÅÝÀµ#@$²±:`^'´\\,{[/.÷;=?)*\-]/gi, c => + '012345678@ABCDEFGHIJKLMNOPQRSTUVWXYÄÜẞZzabcdefghijklmnopqrstuvwxyäüößz,+.-:<>/()!"=[;9]&_?%#\''['123456789ABCDEFGHIJKLMNOPQRSTUVWXYZÅÝÀ[abcdefghijklmnopqrstuvwxyzåý÷à{-,/.;=?0)*²#µ\\´:^\'`@±$'.indexOf(c)]) +} diff --git a/lp/manifest.json b/lp/manifest.json index 398ebaf0..1d62fe7b 100644 --- a/lp/manifest.json +++ b/lp/manifest.json @@ -263,6 +263,7 @@ "*://*.warwickdailynews.com.au/*", "*://*.washingtonpost.com/*", "*://*.watoday.com.au/*", + "*://*.waz.de/*", "*://*.weeklytimesnow.com.au/*", "*://*.westernadvocate.com.au/*", "*://*.wired.com/*", @@ -312,5 +313,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.8.0" + "version": "1.8.8.1" } \ No newline at end of file diff --git a/manifest.json b/manifest.json index b691e163..b3f852b9 100644 --- a/manifest.json +++ b/manifest.json @@ -40,5 +40,5 @@ "webRequest", "webRequestBlocking" ], - "version": "1.8.8.0" + "version": "1.8.8.1" } \ No newline at end of file diff --git a/options.html b/options.html index a8b33ab9..a60046bc 100644 --- a/options.html +++ b/options.html @@ -15,7 +15,7 @@

Options |

-
Changelog +
Changelog
Selected sites will have their cookies cleared and referer set to Google. You should uncheck sites you have an account with or else you will be logged out at every visit.
diff --git a/popup.html b/popup.html index c59c0513..6ee3e638 100644 --- a/popup.html +++ b/popup.html @@ -7,9 +7,9 @@
Bypass Paywalls Clean
Options | Custom | -BitBucket | +BitBucket | -
Changelog +
Changelog
diff --git a/sites.js b/sites.js index a25b7fde..da64e42e 100644 --- a/sites.js +++ b/sites.js @@ -196,6 +196,7 @@ var defaultSites = "Variety": "variety.com", "Volkskrant": "volkskrant.nl", "WAtoday": "watoday.com.au", + "Westdeutsche Allgemeine Zeitung": "waz.de", "Winston-Salem Journal": "journalnow.com", "Wired": "wired.com", "World Politics Review": "worldpoliticsreview.com",