From d8f77d0d6e2fd5e7ae5884e46a961b504290d457 Mon Sep 17 00:00:00 2001
From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com>
Date: Wed, 1 Mar 2023 08:46:00 +0100
Subject: [PATCH] Fix Mediahuis Noord
---
changelog.txt | 3 ++-
contentScript.js | 31 +++++++++++++++++++++----------
custom/manifest.json | 2 +-
custom/sites_custom.json | 3 +++
manifest.json | 2 +-
5 files changed, 28 insertions(+), 13 deletions(-)
diff --git a/changelog.txt b/changelog.txt
index c2a855af..13c6762d 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -5,6 +5,7 @@ Updates: https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/release
Post-release
Add Bloomberg Adria
Add DN.no (cached articles only)
+Fix Mediahuis Noord
Fix mobile user-agent for Google webcache
* v3.0.7.0 (2023-02-26)
@@ -1673,7 +1674,7 @@ Fix Corriere Della Sera
* v1.6.4.3 (2020-02-12)
Add CommonWealth Magazine Taiwan
Add El Mercurio (Chile)
-Add Leeuwarder Courant & Dagblad van het Noorden (Netherlands)
+Add Lc.nl & DvhN.nl
* v1.6.4.2 (2020-02-03)
Add Fd.nl (Googlebot)
diff --git a/contentScript.js b/contentScript.js
index 38918c92..2b31d933 100644
--- a/contentScript.js
+++ b/contentScript.js
@@ -2117,7 +2117,7 @@ else if (matchDomain(be_roularta_domains)) {
else if (matchDomain(['lc.nl', 'dvhn.nl'])) {
if (true) {
- let paywall = document.querySelector('div.signupPlus');
+ let paywall = document.querySelector('div.signupPlus, div.pw-wrapper');
if (paywall) {
let intro = document.querySelector('div.startPayWall');
removeDOMElement(paywall, intro);
@@ -2144,8 +2144,8 @@ else if (matchDomain(['lc.nl', 'dvhn.nl'])) {
let article_html = parser.parseFromString('
' + par.code + '
', 'text/html');
elem = article_html.querySelector('div');
}
- } else if (par.typename === 'Story_insertbox') {
- if (par.insertbox_head) {
+ } else if (par.insertbox_head || par.insertbox_text) {
+ if (par.insertbox_head && par.insertbox_head.length > 2) {
let span = document.createElement('span');
span.innerText = par.insertbox_head;
elem.appendChild(span);
@@ -2159,6 +2159,7 @@ else if (matchDomain(['lc.nl', 'dvhn.nl'])) {
let span = document.createElement('span');
span.innerText = child.text;
elem.appendChild(span);
+ elem.appendChild(document.createElement('br'));
} else if (child.children) {
for (let sub_child of child.children) {
if (sub_child.text) {
@@ -2187,6 +2188,12 @@ else if (matchDomain(['lc.nl', 'dvhn.nl'])) {
par_link.href = child.href;
par_link.innerText = child.children[0].text;
elem.appendChild(par_link);
+ } else if (child.children.length && child.children[0].text) {
+ if (child.children[0].text.length > 2) {
+ let span = document.createElement('span');
+ span.innerText = child.children[0].text;
+ elem.appendChild(span);
+ }
}
}
} else if (par.typename.length > 2)
@@ -4632,14 +4639,18 @@ else if ((domain = matchDomain(usa_lee_ent_domains)) || document.querySelector('
let elem_hidden = document.querySelectorAll('html[class], body[class]');
for (let elem of elem_hidden)
elem.removeAttribute('class');
- } else if (!domain) {
- let subscriber_only = document.querySelectorAll('div.subscriber-only:not(.encrypted-content)');
- for (let elem of subscriber_only) {
- elem.removeAttribute('style');
- elem.removeAttribute('class');
+ } else {
+ if (!domain) {
+ let subscriber_only = document.querySelectorAll('div.subscriber-only:not(.encrypted-content)');
+ for (let elem of subscriber_only) {
+ elem.removeAttribute('style');
+ elem.removeAttribute('class');
+ }
+ let banners = document.querySelectorAll('div.subscription-required, div.redacted-overlay');
+ removeDOMElement(...banners);
}
- let banners = document.querySelectorAll('div.subscription-required, div.redacted-overlay, div.tnt-ads-container');
- removeDOMElement(...banners);
+ let ads = document.querySelectorAll('div.tnt-ads-container');
+ removeDOMElement(...ads);
}
}
diff --git a/custom/manifest.json b/custom/manifest.json
index 1c221b39..44d04d07 100644
--- a/custom/manifest.json
+++ b/custom/manifest.json
@@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
- "version": "3.0.7.2"
+ "version": "3.0.7.3"
}
diff --git a/custom/sites_custom.json b/custom/sites_custom.json
index 2f50b2c3..aa3a69ca 100644
--- a/custom/sites_custom.json
+++ b/custom/sites_custom.json
@@ -342,6 +342,9 @@
"block_regex": "loader-cdn\\.azureedge\\.net",
"domain": "pressherald.com"
},
+ "Quickmath.com": {
+ "domain": "quickmath.com"
+ },
"Reviewjournal.com": {
"allow_cookies": 1,
"block_regex": "js\\.matheranalytics\\.com",
diff --git a/manifest.json b/manifest.json
index 737768f0..d7ab6fe9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -745,5 +745,5 @@
"*://*.wallkit.net/*",
"*://webcache.googleusercontent.com/*"
],
- "version": "3.0.7.2"
+ "version": "3.0.7.3"
}