From 90a97d26a8c0ea2a8b63163434cd0c15e3fd32b4 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Fri, 11 Nov 2022 07:26:34 +0100 Subject: [PATCH] Fix La Croix --- changelog.txt | 1 + contentScript.js | 5 ++--- manifest.json | 2 +- sites.js | 2 +- sites_updated.json | 5 +++++ 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2e70707..e22ce79 100644 --- a/changelog.txt +++ b/changelog.txt @@ -9,6 +9,7 @@ Add The New York Post Remove Dn.no (fix obsolete) Fix Cmjornal.pt Fix Koelner Stadt-Anzeiger & Koelnische Rundschau +Fix La Croix Fix NHST Media Group Fix Tagesspiegel.de (link to archive.is) Fix for Kiwi Browser/Android (Chrome-synch) diff --git a/contentScript.js b/contentScript.js index 8bf7ba6..0db836a 100644 --- a/contentScript.js +++ b/contentScript.js @@ -1301,9 +1301,8 @@ else if (matchDomain('journaldunet.com')) { else if (matchDomain('la-croix.com')) { let url = window.location.href; if (!url.includes('la-croix.com/amp/')) { - let hidden_images = document.querySelectorAll('source[srcset]'); - for (let elem of hidden_images) - elem.removeAttribute('srcset'); + let ads = document.querySelectorAll('div[class^="ads-wrapper-"]'); + removeDOMElement(...ads); } else { let paywall_block = document.querySelector('#paywall_block'); let amp_ads = document.querySelectorAll('amp-ad, amp-embed'); diff --git a/manifest.json b/manifest.json index 2374aeb..4f40b20 100644 --- a/manifest.json +++ b/manifest.json @@ -730,5 +730,5 @@ "*://gcm.omerlocdn.com/*", "*://webcache.googleusercontent.com/*" ], - "version": "2.9.2.7" + "version": "2.9.2.8" } diff --git a/sites.js b/sites.js index 8c2e8d5..c19da7b 100644 --- a/sites.js +++ b/sites.js @@ -1023,7 +1023,7 @@ var defaultSites = { "La Croix": { domain: "la-croix.com", allow_cookies: 1, - block_regex: /(\.la-croix\.com\/build\/lacroix\/article.+\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ + block_regex: /(\.la-croix\.com\/build\/.+\/paywall.+\.js|cdn\.ampproject\.org\/v\d\/amp-access-.+\.js)/ }, "La Gazzetta dello Sport": { domain: "gazzetta.it", diff --git a/sites_updated.json b/sites_updated.json index cdc1414..9b8fbe6 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -5,6 +5,11 @@ "block_regex": "cdn\\.ampproject\\.org\\/v\\d\\/amp-(subscriptions|consent)-.+\\.js", "amp_unhide": 1 }, + "La Croix": { + "domain": "la-croix.com", + "allow_cookies": 1, + "block_regex": "(\\.la-croix\\.com\\/build\\/.+\\/paywall.+\\.js|cdn\\.ampproject\\.org\\/v\\d\\/amp-access-.+\\.js)" + }, "Mediapart.fr": { "domain": "mediapart.fr", "allow_cookies": 1,