From ab42d49411d9df633b4b4a8483f0586eb7cf9a24 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Tue, 19 Mar 2024 08:51:06 +0100 Subject: [PATCH] Add CNN (regwall) --- README.md | 1 + changelog.txt | 1 + contentScript.js | 8 ++++++++ contentScript_once.js | 2 +- custom/manifest.json | 2 +- custom/sites_custom.json | 10 ++++++++++ manifest.json | 3 ++- sites.js | 6 +++++- 8 files changed, 29 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 150a516..66134d6 100644 --- a/README.md +++ b/README.md @@ -300,6 +300,7 @@ Grouped in options:\ ##### Local USA news [Albuquerque Journal](https://www.abqjournal.com) - +[CNN](https://www.cnn.com) - [Fox News](https://www.foxnews.com) - [Honolulu Star-Advertiser](https://www.staradvertiser.com) - [Los Angeles Times](https://www.latimes.com) - diff --git a/changelog.txt b/changelog.txt index 3d4533b..11a255d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases Post-release +Add CNN (regwall) Fix Expresso.pt (json) Fix The Athletic (scroll) diff --git a/contentScript.js b/contentScript.js index dc61d8f..3902f5d 100644 --- a/contentScript.js +++ b/contentScript.js @@ -3955,6 +3955,14 @@ else if (matchDomain('cnbc.com')) { } } +else if (matchDomain('cnn.com')) { + for (let item in window.localStorage) + if (item.match(/reg_?wall/i)) + window.localStorage.removeItem(item); + let ads = document.querySelectorAll('div[class^="ad-slot-"], div.container__ads'); + hideDOMElement(...ads); +} + else if (matchDomain('columbian.com')) { let url = window.location.href; func_post = function () { diff --git a/contentScript_once.js b/contentScript_once.js index 210ad5a..832c323 100644 --- a/contentScript_once.js +++ b/contentScript_once.js @@ -32,7 +32,7 @@ window.setTimeout(function () { let hostname = window.location.hostname; let custom_domain = getCookieDomain(hostname); let group; - if (hostname) { + if (hostname && ext_api.runtime) { if (document.querySelector('head > link[href*=".medium.com/"]') || matchDomain(['plainenglish.io'])) group = 'medium.com'; else if (document.querySelector('head > meta[property="og:image"][content*="beehiiv"]')) diff --git a/custom/manifest.json b/custom/manifest.json index f7cb62c..0dcc95a 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.6.0.1" + "version": "3.6.0.2" } diff --git a/custom/sites_custom.json b/custom/sites_custom.json index 3d94824..12235fb 100644 --- a/custom/sites_custom.json +++ b/custom/sites_custom.json @@ -71,6 +71,11 @@ "allow_cookies": 1, "domain": "bm-online.de" }, + "Booksandpublishing.com.au": { + "allow_cookies": 1, + "domain": "booksandpublishing.com.au", + "ld_json_url": "article form#loginform|div.paywallblurtext" + }, "Bostonmagazine.com": { "allow_cookies": 1, "domain": "bostonmagazine.com", @@ -584,6 +589,11 @@ "domain": "nordsee-zeitung.de", "ld_google_webcache": "div.UserLoggedInContainer|article" }, + "Novethic.fr": { + "allow_cookies": 1, + "domain": "novethic.fr", + "ld_json_url": "div#paywall|div.entry-content" + }, "Nu.nl": { "allow_cookies": 1, "cs_code": "[{\"cond\":\"article#LOGIN\",\"rm_elem\":1},{\"cond\":\"div.authorized-content\",\"rm_class\":\"authorized-content\"}]", diff --git a/manifest.json b/manifest.json index 5fb96f8..34187c4 100644 --- a/manifest.json +++ b/manifest.json @@ -162,6 +162,7 @@ "*://*.climbing.com/*", "*://*.cmjornal.pt/*", "*://*.cnbc.com/*", + "*://*.cnn.com/*", "*://*.cntraveler.com/*", "*://*.columbian.com/*", "*://*.commentary.org/*", @@ -860,5 +861,5 @@ "*://archive.vn/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.6.0.1" + "version": "3.6.0.2" } diff --git a/sites.js b/sites.js index 08750cc..e4738ff 100644 --- a/sites.js +++ b/sites.js @@ -397,6 +397,10 @@ var defaultSites = { allow_cookies: 1, block_regex: /\.tinypass\.com\// }, + "CNN (regwall)": { + domain: "cnn.com", + allow_cookies: 1 + }, "Commentary Magazine": { domain: "commentary.org", block_regex: /\.commentary\.org\/.+\/js\/dg-locker-public\.js/ @@ -3114,7 +3118,7 @@ init_custom_flex_domains(); var de_funke_medien_nofix_domains = ['harzkurier.de', 'ikz-online.de']; var de_rp_aachen_medien_nofix_domains = ['aachener-nachrichten.de', 'aachener-zeitung.de', 'ga.de', 'rp-online.de', 'saarbruecker-zeitung.de', 'volksfreund.de']; var de_westfalen_medien_nofix_domains = ['muensterschezeitung.de', 'westfalen-blatt.de', 'wn.de']; -var fr_be_groupe_rossel_nofix_domains = ['aisnenouvelle.fr', 'courrier-picard.fr', 'lardennais.fr', 'lavoixdunord.fr', 'lesoir.be', 'lest-eclair.fr', 'liberation-champagne.fr', 'lunion.fr', 'nordlittoral.fr', 'paris-normandie.fr', 'sudinfo.be']; +var fr_be_groupe_rossel_nofix_domains = ['aisnenouvelle.fr', 'courrier-picard.fr', 'lardennais.fr', 'lavoixdunord.fr', 'lemessager.fr', 'lesoir.be', 'lest-eclair.fr', 'liberation-champagne.fr', 'lunion.fr', 'nordlittoral.fr', 'paris-normandie.fr', 'sudinfo.be']; var fr_groupe_ebra_nofix_domains = ['bienpublic.com', 'dna.fr', 'estrepublicain.fr', 'lalsace.fr', 'ledauphine.com', 'lejsl.com', 'leprogres.fr', 'republicain-lorrain.fr', 'vosgesmatin.fr']; var fr_indigo_nofix_domains = ['africaintelligence.com', 'africaintelligence.fr', 'glitz.paris', 'intelligenceonline.com', 'intelligenceonline.fr', 'lalettre.fr']; var fr_jamg_nofix_domains = ['africabusinessplus.com', 'jeuneafrique.com', 'theafricareport.com'];