Fix The Japan Times (json for archive)

merge-requests/15/head
magnolia1234 10 months ago
parent cce4b2b499
commit 03325566a7

@ -7,6 +7,7 @@ Add Ruhr Nachrichten (+ Media Group Westfalen; opt-in to custom sites)
Fix El Diario Vasco (mobile amp-redirect)
Fix New Scientist (regwall)
Fix Star Tribune (mobile)
Fix The Japan Times (json for archive)
Maintenance updated sites (clear)
* v3.2.6.0 (2023-07-23)

@ -4145,6 +4145,33 @@ else if (matchDomain('ipolitics.ca')) {
}
}
else if (matchDomain('japantimes.co.jp')) {
if (!window.location.pathname.endsWith('/amp')) {
window.setTimeout(function () {
let paywall = document.querySelector('div.blocker > div.tp-container-inner');
if (paywall) {
removeDOMElement(paywall.parentNode);
let json_script = getArticleJsonScript();
if (json_script) {
let json = JSON.parse(json_script.text);
if (json) {
let json_text = json.articleBody;
let article = document.querySelector('div.article-body');
if (json_text && article) {
let article_new = document.createElement('p');
article_new.innerText = breakText(json_text);
article.innerHTML = '';
article.appendChild(article_new);
article.classList.remove('blurred-text');
}
}
}
}
}, 1000);
} else
ampToHtml();
}
else if (matchDomain('jpost.com')) {
let premium_banners = document.querySelectorAll('.hide-for-premium, #hiddenPremiumForm, #hiddenLink');
removeDOMElement(...premium_banners);

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.2.6.3"
"version": "3.2.6.4"
}

@ -769,5 +769,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.2.6.3"
"version": "3.2.6.4"
}

@ -2098,7 +2098,7 @@ var defaultSites = {
allow_cookies: 1,
block_regex: /\.irishtimes\.com\/zephr\/feature/
},
"The Japan Times (recent/last 2 months articles only; do not block Piano.io-script externally)": {
"The Japan Times (do not block Piano.io-script externally)": {
domain: "japantimes.co.jp",
block_regex: /cdn\.cxense\.com\//,
remove_cookies_select_drop: ["xbc"]

@ -150,6 +150,13 @@
"remove_cookies_select_drop": ["articleViews"],
"upd_version": "3.0.3.8"
},
"The Japan Times (recent/last 2 months articles only; do not block Piano.io-script externally)": {
"domain": "japantimes.co.jp",
"block_regex": "cdn\\.cxense\\.com",
"remove_cookies_select_drop": ["xbc"],
"ld_json": "div.blocker > div.tp-container-inner|div.article-body|1",
"upd_version": "3.2.6.4"
},
"The New York Times": {
"domain": "nytimes.com",
"allow_cookies": 1,

Loading…
Cancel
Save