diff --git a/README.md b/README.md index 0214316..a1ad20a 100644 --- a/README.md +++ b/README.md @@ -42,20 +42,23 @@ For new sites you also have to opt-in to custom sites/request host permissions f ### Android Add-on was removed by Mozilla from [add-on store (AMO)](https://addons.mozilla.org).\ -Current installations (by custom collection in Firefox Beta/Nightly or Firefox-clone) will stay active, but with no more updates. +Current installations (by custom collection in Firefox Beta/Nightly or Firefox-fork) will stay active, but with no more updates. -There is still an elaborate workaround for regular Firefox (or Beta/Clone) though: +Firefox-fork [Iceraven](https://github.com/fork-maintainers/iceraven-browser) v2.13.2+ can still install a xpi-file though (add-on updates automatically).\ +You can install/update Iceraven manually or use the app [FFUpdater](https://github.com/Tobi823/ffupdater) + +The experimental Mozac/GeckoView-based browser [SmartCookieWeb-Preview](https://github.com/CookieJarApps/SmartCookieWeb-Preview/releases) can also install/sideload a xpi-file by url (Settings > Advanced settings > Sideload XPI). + +There is still an elaborate workaround for regular Firefox (or Beta/fork) though: * install an old version of Firefox (like v68.11.0 from [archive.mozilla.org](https://archive.mozilla.org/pub/mobile/releases/68.11.0/) or [apkmirror.com](https://www.apkmirror.com/apk/mozilla/firefox/firefox-68-11-0-release)); first you have to remove your current Firefox app.\ -Specifically for the add-on you can also use Firefox Beta or a Firefox clone like [Fennec F-Droid](https://f-droid.org/packages/org.mozilla.fennec_fdroid) where you can [set a custom add-on collection](https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly) (for amo-listed add-ons); again first install an old version of [Firefox Beta v68.7](https://www.apkmirror.com/apk/mozilla/firefox-beta/firefox-beta-68-7-release) or [Fennec F-droid v68.11.0](https://www.apkmirror.com/apk/mozilla/fennec-f-droid/fennec-f-droid-68-11-0-release) +Specifically for the add-on you can also use Firefox Beta or a Firefox-fork like [Fennec F-Droid](https://f-droid.org/packages/org.mozilla.fennec_fdroid) where you can [set a custom add-on collection](https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly) (for amo-listed add-ons); again first install an old version of [Firefox Beta v68.7](https://www.apkmirror.com/apk/mozilla/firefox-beta/firefox-beta-68-7-release) or [Fennec F-droid v68.11.0](https://www.apkmirror.com/apk/mozilla/fennec-f-droid/fennec-f-droid-68-11-0-release) * download add-on's xpi-file (custom version if you want to use custom sites) from [releases](https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases) and install/open in Firefox (from downloads) * now you can update Firefox to the latest version * add-on will stay active & automatically updates to the latest version -The experimental Mozac/GeckoView-based browser [SmartCookieWeb-Preview](https://github.com/CookieJarApps/SmartCookieWeb-Preview/releases) can also install/sideload a xpi-file by url (Settings > Advanced settings > Sideload XPI). - Or install a [cloned amo-version](https://www.google.com/search?q=bypass+paywalls+clean+addons.mozilla.org+-lee) in Firefox for Android 120+. -Or switch to [Kiwi browser (Chromium)](https://play.google.com/store/apps/details?id=com.kiwibrowser.browser) or use the [adblocker filter/userscripts](https://gitlab.com/magnolia1234/bypass-paywalls-clean-filters) +Or switch to [Kiwi browser (Chromium)](https://play.google.com/store/apps/details?id=com.kiwibrowser.browser) or use the [adblocker filter/userscripts](https://gitlab.com/magnolia1234/bypass-paywalls-clean-filters) (much less supported sites). #### Chrome/Chromium Visit the [Chrome repository](https://gitlab.com/magnolia1234/bypass-paywalls-chrome-clean) of Bypass Paywall Clean. diff --git a/changelog.txt b/changelog.txt index 478d78d..0d204d3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Post-release Add 3 more Hearst newspapers Add Ikz-online.de (Funke) Remove Braunschweiger-zeitung.de (Funke; fix obsolete) +Fix Defector Fix Freitag.de (text-break) Fix La Segunda Fix LeParisien.fr (amp-redirect) diff --git a/contentScript.js b/contentScript.js index 0a28a3a..e22303a 100644 --- a/contentScript.js +++ b/contentScript.js @@ -2688,7 +2688,7 @@ else if (matchDomain('telegraaf.nl')) { } if (window_script) { removeDOMElement(paywall); - let window_text = window_script.text.split('window.telegraaf.articleBodyBlocks')[1].replace(/(^\s?=\s?"|";$|\\")/gm, '').replace(/\\\\u003c/gm, '<'); + let window_text = window_script.text.split('window.telegraaf.articleBodyBlocks')[1].split('window.telegraaf.')[0].replace(/(^\s?=\s?"|";$|\\")/gm, '').replace(/\\\\u003c/gm, '<'); let parser = new DOMParser(); let doc = parser.parseFromString('
' + DOMPurify.sanitize(window_text) + '
', 'text/html'); let article_new = doc.querySelector('div'); @@ -3789,7 +3789,30 @@ else if (matchDomain('dallasnews.com')) { else if (matchDomain('defector.com')) { let paywall = document.querySelector('div[class^="ContentGate_wrapper__"]'); - removeDOMElement(paywall); + if (paywall && dompurify_loaded) { + removeDOMElement(paywall); + let article_sel = 'div[class^="PostContent_wrapper__"]'; + let article = document.querySelector(article_sel); + if (article) { + window.setTimeout(function () { + let pars = article.querySelectorAll('p'); + if (pars.length < 3) { + let url = window.location.href.split('?')[0]; + fetch(url) + .then(response => { + if (response.ok) { + response.text().then(html => { + let parser = new DOMParser(); + let doc = parser.parseFromString(DOMPurify.sanitize(html, {ADD_TAGS: ['iframe'], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'target']}), 'text/html'); + let article_new = doc.querySelector(article_sel); + article.parentNode.replaceChild(article_new, article); + }); + } + }); + } + }, 1000); + } + } } else if (matchDomain('digiday.com')) { diff --git a/custom/manifest.json b/custom/manifest.json index a07360a..ee011f3 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.4.4.4" + "version": "3.4.4.5" } diff --git a/custom/sites_custom.json b/custom/sites_custom.json index 6a2908a..6b89ee1 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -288,6 +288,12 @@ "domain": "gramophone.co.uk", "useragent": "googlebot" }, + "Group_nation_media": { + "allow_cookies": 1, + "cs_code": "[{\"cond\":\"div.modal\",\"rm_elem\":1,\"elems\":[{\"cond\":\".nmgp\",\"rm_class\":\"nmgp\"}]}]", + "domain": "group_nation_media", + "group": "monitor.co.ug,nation.africa,thecitizen.co.tz" + }, "Handelsblatt.com (refresh)": { "add_ext_link": "app-paywall|app-storyline-paragraph", "add_ext_link_type": "archive.is", @@ -447,6 +453,11 @@ "domain": "mining-journal.com", "ld_json": "div.article-teaser|div.article-content>p" }, + "Mopo.de": { + "allow_cookies": 1, + "domain": "mopo.de", + "ld_json_url": "div#paywall|div.paywall-fade" + }, "Museumsassociation.org": { "allow_cookies": 1, "cs_code": "[{\"cond\":\"body.paywall\", \"rm_class\":\"paywall\", \"elems\":[{\"cond\":\"body[style]\", \"rm_attrib\":\"style\"}, {\"cond\":\"div#paywall-wrapper,div.advertising\", \"rm_elem\":1}]}]", @@ -458,11 +469,6 @@ "cs_code": "[{\"cond\":\"div.post\", \"rm_elem\":1, \"elems\": [{\"cond\":\"div.article-body-wrapper__styled[style]\", \"rm_attrib\":\"style\"}]}]", "domain": "nacion.com" }, - "Nation.africa": { - "allow_cookies": 1, - "cs_code": "[{\"cond\":\"div.modal\",\"rm_elem\":1,\"elems\":[{\"cond\":\".nmgp\",\"rm_class\":\"nmgp\"}]}]", - "domain": "nation.africa" - }, "Nationalobserver.com": { "allow_cookies": 1, "block_regex": "\\.tinypass\\.com", diff --git a/manifest.json b/manifest.json index b120907..0ca2af2 100644 --- a/manifest.json +++ b/manifest.json @@ -824,5 +824,5 @@ "*://*.wyleex.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.4.4.4" + "version": "3.4.4.5" } diff --git a/sites.js b/sites.js index b83cc26..68373e6 100644 --- a/sites.js +++ b/sites.js @@ -475,7 +475,8 @@ var defaultSites = { }, "Defector": { domain: "defector.com", - remove_cookies_select_drop: ["lede_defector_user"] + allow_cookies: 1, + cs_dompurify: 1 }, "Der Freitag": { "domain": "freitag.de", diff --git a/sites_updated.json b/sites_updated.json index b078263..d3a72b5 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -5,6 +5,12 @@ "block_regex": "(\\.cm\\.bloomberg\\.com\\/|assets\\.bwbx\\.io\\/s\\d\\/javelin\\/.+\\/transporter\\/)", "upd_version": "3.2.7.1" }, + "Defector": { + "domain": "defector.com", + "allow_cookies": 1, + "block_regex": "\\/defector\\.com\\/_next\\/static\\/chunks\\/pages\\/_sites\\/%5BsiteSlug%5D\\/%5B.+\\.js", + "upd_version": "3.4.4.5" + }, "Der Freitag": { "domain": "freitag.de", "allow_cookies": 1,