diff --git a/background.js b/background.js index 3ba40a9..bca64a9 100644 --- a/background.js +++ b/background.js @@ -1084,8 +1084,7 @@ if (matchUrlDomain(change_headers, details.url) && !ignore_types.includes(detail !(matchUrlDomain(['economictimes.com', 'economictimes.indiatimes.com'], details.url) && !details.url.split(/\?|#/)[0].endsWith('.cms')) && !(matchUrlDomain(au_news_corp_domains, details.url) && (details.url.includes('?amp') || (!matchUrlDomain(au_news_corp_no_amp_fix, details.url) && enabledSites.includes('#options_disable_gb_au_news_corp')))) && !(matchUrlDomain('nytimes.com', details.url) && details.url.includes('.nytimes.com/live/')) && - !(matchUrlDomain('uol.com.br', details.url) && !matchUrlDomain('folha.uol.com.br', details.url)) && - !(matchUrlDomain('www.wsj.com', details.url)); + !(matchUrlDomain('uol.com.br', details.url) && !matchUrlDomain('folha.uol.com.br', details.url)) ; var bingbotEnabled = matchUrlDomain(use_bing_bot, details.url); var facebookbotEnabled = matchUrlDomain(use_facebook_bot, details.url); var useragent_customEnabled = matchUrlDomain(use_useragent_custom, details.url); diff --git a/changelog.txt b/changelog.txt index 0034f82..6e7b5f7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -11,6 +11,7 @@ Fix Haaretz Group (anti-adblocker) Fix Newsweek.pl (css) Fix The Athletic (scroll) Fix The News Minute (json) +Fix WSJ (disable bot/referer) * v3.6.0.0 (2024-03-17) Add Courrier international diff --git a/contentScript.js b/contentScript.js index 5c52bdd..0baf730 100644 --- a/contentScript.js +++ b/contentScript.js @@ -6054,8 +6054,6 @@ else if (matchDomain('winnipegfreepress.com')) { } else if (matchDomain('wsj.com')) { - if (matchDomain('www.wsj.com')) - blockJsReferrer(); if (window.location.pathname.startsWith('/livecoverage/')) { window.setTimeout(function () { let paywall = document.querySelector('div#cx-lc-snippet'); @@ -6077,9 +6075,6 @@ else if (matchDomain('wsj.com')) { if (url_article || path_article) { if (window.location.pathname.startsWith('/amp/')) { amp_unhide_subscr_section(); - let masthead_link = document.querySelector('div.masthead > a[href*="-"]'); - if (masthead_link) - masthead_link.href = 'https://www.wsj.com'; } else { let paywall_sel = '.snippet-promotion, div#cx-snippet-overlay'; let paywall = document.querySelector(paywall_sel); @@ -6096,6 +6091,26 @@ else if (matchDomain('wsj.com')) { let wsj_pro = paywall.querySelector('a[href^="https://wsjpro.com/"]'); if (wsj_pro) article_sel = 'article'; + func_post = function () { + if (mobile) { + let inline_images = document.querySelectorAll('div[style] > figure > picture > img'); + for (let elem of inline_images) { + elem.style = 'width: 100%;'; + elem.removeAttribute('height'); + elem.removeAttribute('width'); + elem.parentNode.removeAttribute('style'); + elem.parentNode.parentNode.parentNode.removeAttribute('style'); + } + let inline_data = document.querySelectorAll('div[data-layout="inline"][style]'); + for (let elem of inline_data) + elem.removeAttribute('style'); + } + let read_next = document.querySelector('div#cx-what-to-read-next'); + removeDOMElement(read_next); + let inline_wrappers = document.querySelectorAll('div[style*="background-position"] > div[id^="wrapper-INLINEIMM_"]'); + for (let elem of inline_wrappers) + removeDOMElement(elem.parentNode); + } getArchive(url, paywall_sel, '', article_sel); } } diff --git a/custom/manifest.json b/custom/manifest.json index c5a2eb8..603a74c 100644 --- a/custom/manifest.json +++ b/custom/manifest.json @@ -51,5 +51,5 @@ "webRequestBlocking", "*://*/*" ], - "version": "3.6.0.5" + "version": "3.6.0.6" } diff --git a/manifest.json b/manifest.json index 176d176..663a3da 100644 --- a/manifest.json +++ b/manifest.json @@ -862,5 +862,5 @@ "*://archive.vn/*", "*://webcache.googleusercontent.com/*" ], - "version": "3.6.0.5" + "version": "3.6.0.6" } diff --git a/sites.js b/sites.js index 7268daa..cd1c1e8 100644 --- a/sites.js +++ b/sites.js @@ -2701,12 +2701,10 @@ var defaultSites = { allow_cookies: 1, cs_dompurify: 1 }, - "The Wall Street Journal": { + "The Wall Street Journal (fetch from archive.is)": { domain: "wsj.com", allow_cookies: 1, block_regex: /(cdn\.cxense\.com\/|cdn\.ampproject\.org\/v\d\/amp-subscriptions-.+\.js)/, - referer_custom: "https://www.drudgereport.com/", - useragent: "googlebot", cs_dompurify: 1 }, "The Washington Post": { diff --git a/sites_updated.json b/sites_updated.json index 3404706..ec73430 100644 --- a/sites_updated.json +++ b/sites_updated.json @@ -124,5 +124,12 @@ "allow_cookies": 1, "ld_json": "div[id*='paywall-banner']|div[class^='paywall-story-']", "upd_version": "3.6.0.5" + }, + "The Wall Street Journal": { + "domain": "wsj.com", + "allow_cookies": 1, + "block_regex": "(cdn\\.cxense\\.com\\/|cdn\\.ampproject\\.org\\/v\\d\\/amp-subscriptions-.+\\.js)", + "cs_dompurify": 1, + "upd_version": "3.6.0.6" } }