mirror of
https://gitlab.com/magnolia1234/bypass-paywalls-firefox-clean.git
synced 2024-09-20 01:41:06 +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
|
||||
|
||||
Post-release
|
||||
Fix The Hill Times (ld_json_url)
|
||||
Update popup (fix toggle for custom flex sites)
|
||||
|
||||
* v3.4.3.0 (2023-11-19)
|
||||
|
|
|
@ -4002,31 +4002,17 @@ else if (matchDomain('hbr.org')) {
|
|||
|
||||
else if (matchDomain('hilltimes.com')) {
|
||||
function hilltimes_main(node) {
|
||||
let paywall_banner = document.querySelector('div.paywallcont2');
|
||||
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);
|
||||
}
|
||||
}
|
||||
getJsonUrl('div.paywallcont', '', 'div#entry-content');
|
||||
}
|
||||
let paywall_sel = 'div.paywallcont';
|
||||
let paywall = document.querySelector(paywall_sel);
|
||||
if (paywall) {
|
||||
hilltimes_main(paywall);
|
||||
} else {
|
||||
waitDOMElement(paywall_sel, 'DIV', hilltimes_main, false);
|
||||
if (dompurify_loaded) {
|
||||
if (paywall)
|
||||
hilltimes_main(paywall);
|
||||
else
|
||||
waitDOMElement(paywall_sel, 'DIV', hilltimes_main, false);
|
||||
csDoneOnce = true;
|
||||
}
|
||||
csDoneOnce = true;
|
||||
window.setTimeout(function () {
|
||||
let banner = document.querySelector('section.hide_this_section');
|
||||
hideDOMElement(banner);
|
||||
|
|
|
@ -51,5 +51,5 @@
|
|||
"webRequestBlocking",
|
||||
"*://*/*"
|
||||
],
|
||||
"version": "3.4.3.1"
|
||||
"version": "3.4.3.2"
|
||||
}
|
||||
|
|
|
@ -815,5 +815,5 @@
|
|||
"*://*.wyleex.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",
|
||||
allow_cookies: 1,
|
||||
block_regex: /\.hilltimes\.com\/.+\/js\/loadingoverlay\/loadingoverlay\.min\.js/,
|
||||
useragent: "googlebot"
|
||||
useragent: "googlebot",
|
||||
cs_dompurify: 1
|
||||
},
|
||||
"The Hindu": {
|
||||
domain: "thehindu.com",
|
||||
|
|
Loading…
Reference in a new issue