Fix WSJ Pro

This commit is contained in:
magnolia1234 2024-01-28 18:20:04 +01:00
parent d17fcdb3c9
commit bd49800450
6 changed files with 29 additions and 41 deletions

View File

@ -12,6 +12,7 @@ Fix Grupo Abril (js)
Fix Haaretz Group (anti-adblocker)
Fix LesEchos.fr
Fix TopAgrar (js-inline)
Fix WSJ Pro (fetch from archive.is)
* v3.5.2.0 (2024-01-21)
Add Hln.be (fetch from archive.is)

View File

@ -5558,34 +5558,28 @@ else if (matchDomain('wsj.com')) {
if (masthead_link)
masthead_link.href = 'https://www.wsj.com';
} else {
let snippet = document.querySelector('.snippet-promotion, div#cx-snippet-overlay');
if (snippet) {
removeDOMElement(snippet);
let paywall_sel = '.snippet-promotion, div#cx-snippet-overlay';
let paywall = document.querySelector(paywall_sel);
if (paywall) {
if (!matchDomain('www.wsj.com')) {
removeDOMElement(paywall);
if (url_article)
window.location.href = window.location.href.replace('wsj.com', 'wsj.com/amp');
else
window.location.href = '/amp/articles/' + path_article[0];
} else {
let wsj_pro = snippet.querySelector('a[href^="https://wsjpro.com/"]');
let article = document.querySelector('article');
if (article) {
window.setTimeout(function () {
if (wsj_pro) {
article.firstChild.before(googleSearchToolLink(window.location.href));
article.firstChild.before(archiveLink(window.location.href, 'BPC > Try for full article text (articles before 2023-10-28)'));
} else
article.firstChild.before(archiveLink(window.location.href));
}, 500);
csDoneOnce = true;
waitDOMElement('div.paywall', 'DIV', node => hideDOMElement(...document.querySelectorAll('div#bpc_archive')), false);
}
} else if (dompurify_loaded) {
let url = window.location.href;
let article_sel = 'article section';
let wsj_pro = paywall.querySelector('a[href^="https://wsjpro.com/"]');
if (wsj_pro)
article_sel = 'article';
getArchive(url, paywall_sel, '', article_sel);
}
}
}
}
}
let ads = document.querySelectorAll('div.wsj-ad, div.adWrapper, div.uds-ad-container');
let ads = document.querySelectorAll('div.wsj-ad, div.adWrapper, div.uds-ad-container, div.css-xgokil-Box');
hideDOMElement(...ads);
}

View File

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.5.2.6"
"version": "3.5.2.7"
}

View File

@ -261,6 +261,12 @@
"domain": "gramophone.co.uk",
"useragent": "googlebot"
},
"Group_de_ozg": {
"allow_cookies": 1,
"domain": "group_de_ozg",
"group": "borkumer-zeitung.de,ga-online.de,on-online.de,oz-online.de",
"ld_json": "div.paywall|div.pointer-events-none"
},
"Group_media_source_inc": {
"allow_cookies": 1,
"block_regex": "\\.com\\/.+\\/js\\/metering\\.js",
@ -273,6 +279,12 @@
"domain": "group_nation_media",
"group": "monitor.co.ug,nation.africa,thecitizen.co.tz"
},
"Group_van_magazine": {
"allow_cookies": 1,
"domain": "group_van_magazine",
"group": "van-magazine.com,van-magazin.de",
"ld_json_url": "div.newspack-metered-paywall-block|div.entry-content"
},
"Hartenergy.com": {
"allow_cookies": 1,
"block_regex": "js\\.pelcro\\.com",
@ -512,11 +524,6 @@
"cs_code": "[{\"cond\":\"div[property='content:encoded']\", \"rm_attrib\":\"property\"}]",
"domain": "odt.co.nz"
},
"On-online.de": {
"allow_cookies": 1,
"domain": "on-online.de",
"ld_json": "div.paywall|div.pointer-events-none"
},
"Onet.pl": {
"allow_cookies": 1,
"domain": "onet.pl",
@ -533,11 +540,6 @@
"cs_code": "[{\"cond\":\"div.id-TBeepSlot\", \"rm_elem\":1}]",
"domain": "ovb-online.de"
},
"Oz-online.de": {
"allow_cookies": 1,
"domain": "oz-online.de",
"ld_json": "div.paywall|div.pointer-events-none"
},
"Pebmed.com.br": {
"allow_cookies": 1,
"block_regex": "\\/pebmed\\.com\\.br\\/wp-content\\/.+\\/paywall\\/dist\\/js\\/app\\.js",
@ -814,16 +816,6 @@
"domain": "utilityweek.co.uk",
"useragent": "googlebot"
},
"Van-magazin.de": {
"allow_cookies": 1,
"domain": "van-magazin.de",
"ld_json_url": "div.newspack-metered-paywall-block|div.entry-content"
},
"Van-magazine.com": {
"allow_cookies": 1,
"domain": "van-magazine.com",
"ld_json_url": "div.newspack-metered-paywall-block|div.entry-content"
},
"Washingtontimes.com": {
"allow_cookies": 1,
"block_regex": "\\.tinypass\\.com",

View File

@ -841,5 +841,5 @@
"*://archive.vn/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.5.2.6"
"version": "3.5.2.7"
}

View File

@ -2577,7 +2577,8 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/,
referer: "drudgereport",
useragent: "googlebot"
useragent: "googlebot",
cs_dompurify: 1
},
"The Washington Post": {
domain: "washingtonpost.com",