mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-09-20 05:33:40 +02:00
Fix The Hill Times (ld_json_url)
This commit is contained in:
parent
5d86262d66
commit
747d1d36cc
5 changed files with 12 additions and 24 deletions
|
@ -3,6 +3,7 @@ Changelog Bypass Paywalls Clean - Firefox
|
||||||
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
|
Updates (install signed xpi-file): https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean/-/releases
|
||||||
|
|
||||||
Post-release
|
Post-release
|
||||||
|
Fix The Hill Times (ld_json_url)
|
||||||
Update popup (fix toggle for custom flex sites)
|
Update popup (fix toggle for custom flex sites)
|
||||||
|
|
||||||
* v3.4.3.0 (2023-11-19)
|
* v3.4.3.0 (2023-11-19)
|
||||||
|
|
|
@ -4002,31 +4002,17 @@ else if (matchDomain('hbr.org')) {
|
||||||
|
|
||||||
else if (matchDomain('hilltimes.com')) {
|
else if (matchDomain('hilltimes.com')) {
|
||||||
function hilltimes_main(node) {
|
function hilltimes_main(node) {
|
||||||
let paywall_banner = document.querySelector('div.paywallcont2');
|
getJsonUrl('div.paywallcont', '', 'div#entry-content');
|
||||||
removeDOMElement(node, paywall_banner);
|
|
||||||
let json_script = document.querySelector('script.saswp-schema-markup-output');
|
|
||||||
if (json_script) {
|
|
||||||
try {
|
|
||||||
let json = JSON.parse(json_script.text);
|
|
||||||
let json_text = json.filter(x => x.articleBody)[0].articleBody.replace(/\s{2,}/g, '\r\n\r\n');
|
|
||||||
let article = document.querySelector('div#fadebg > p');
|
|
||||||
if (article) {
|
|
||||||
article.innerText = parseHtmlEntities(json_text);
|
|
||||||
article.parentNode.removeAttribute('id');
|
|
||||||
}
|
|
||||||
} catch (err) {
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
let paywall_sel = 'div.paywallcont';
|
let paywall_sel = 'div.paywallcont';
|
||||||
let paywall = document.querySelector(paywall_sel);
|
let paywall = document.querySelector(paywall_sel);
|
||||||
if (paywall) {
|
if (dompurify_loaded) {
|
||||||
|
if (paywall)
|
||||||
hilltimes_main(paywall);
|
hilltimes_main(paywall);
|
||||||
} else {
|
else
|
||||||
waitDOMElement(paywall_sel, 'DIV', hilltimes_main, false);
|
waitDOMElement(paywall_sel, 'DIV', hilltimes_main, false);
|
||||||
}
|
|
||||||
csDoneOnce = true;
|
csDoneOnce = true;
|
||||||
|
}
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
let banner = document.querySelector('section.hide_this_section');
|
let banner = document.querySelector('section.hide_this_section');
|
||||||
hideDOMElement(banner);
|
hideDOMElement(banner);
|
||||||
|
|
|
@ -51,5 +51,5 @@
|
||||||
"webRequestBlocking",
|
"webRequestBlocking",
|
||||||
"*://*/*"
|
"*://*/*"
|
||||||
],
|
],
|
||||||
"version": "3.4.3.1"
|
"version": "3.4.3.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -815,5 +815,5 @@
|
||||||
"*://*.wyleex.com/*",
|
"*://*.wyleex.com/*",
|
||||||
"*://webcache.googleusercontent.com/*"
|
"*://webcache.googleusercontent.com/*"
|
||||||
],
|
],
|
||||||
"version": "3.4.3.1"
|
"version": "3.4.3.2"
|
||||||
}
|
}
|
||||||
|
|
3
sites.js
3
sites.js
|
@ -2269,7 +2269,8 @@ var defaultSites = {
|
||||||
domain: "hilltimes.com",
|
domain: "hilltimes.com",
|
||||||
allow_cookies: 1,
|
allow_cookies: 1,
|
||||||
block_regex: /\.hilltimes\.com\/.+\/js\/loadingoverlay\/loadingoverlay\.min\.js/,
|
block_regex: /\.hilltimes\.com\/.+\/js\/loadingoverlay\/loadingoverlay\.min\.js/,
|
||||||
useragent: "googlebot"
|
useragent: "googlebot",
|
||||||
|
cs_dompurify: 1
|
||||||
},
|
},
|
||||||
"The Hindu": {
|
"The Hindu": {
|
||||||
domain: "thehindu.com",
|
domain: "thehindu.com",
|
||||||
|
|
Loading…
Reference in a new issue