Fix WSJ (mobile)

This commit is contained in:
magnolia1234 2023-08-19 10:43:56 +02:00
parent aca515059b
commit 1b5d2ff6c5
5 changed files with 11 additions and 17 deletions

View File

@ -997,7 +997,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('uol.com.br', details.url) && !matchUrlDomain('folha.uol.com.br', details.url)) &&
!(matchUrlDomain('wsj.com', details.url) && !details.url.includes('/articles/') && details.type === 'main_frame' && mobile);
!(matchUrlDomain('wsj.com', details.url) && !details.url.match(/((\w)+(\-)+){3,}/) && details.type === 'main_frame' && mobile);
var bingbotEnabled = matchUrlDomain(use_bing_bot, details.url);
var facebookbotEnabled = matchUrlDomain(use_facebook_bot, details.url);

View File

@ -9,7 +9,7 @@ Add Precision Medicine Online (Crain)
Remove Initium Media (fix obsolete)
Fix Ksta.de & Rundschau-online.de (json)
Fix The Press-Enterprise (new domain)
Fix WSJ (remove option to disable Googlebot)
Fix WSJ (mobile & remove option to disable Googlebot)
Grouping/fix GenomeWeb sites (Crain)
Update custom sites (add_ext_link: Google Search Tool)

View File

@ -2048,7 +2048,7 @@ else if (matchDomain(it_ilmessaggero_domains)) {
let noscroll = document.querySelector('html[style]');
if (noscroll)
noscroll.removeAttribute('style');
let ads = document.querySelectorAll('div.adv_banner, div#outbrain');
let ads = document.querySelectorAll('div.adv_banner, div.inread_adv, div#outbrain');
hideDOMElement(...ads);
}
}
@ -5234,27 +5234,21 @@ else if (matchDomain('winnipegfreepress.com')) {
}
else if (matchDomain('wsj.com')) {
let url = window.location.href;
if (location.href.includes('/articles/')) {
let close_button = document.querySelector('div.close-btn[role="button"]');
if (close_button)
close_button.click();
}
let wsj_ads = document.querySelectorAll('div.wsj-ad, div.adWrapper');
removeDOMElement(...wsj_ads);
if (url.includes('/amp/')) {
if (window.location.pathname.includes('/amp/')) {
amp_unhide_subscr_section();
let masthead_link = document.querySelector('div.masthead > a[href*="/articles/"]');
if (masthead_link)
masthead_link.href = 'https://www.wsj.com';
amp_unhide_subscr_section();
} else {
let snippet = document.querySelector('.snippet-promotion, div#cx-snippet-overlay');
let snippet = false;//document.querySelector('.snippet-promotion, div#cx-snippet-overlay');
let wsj_pro = document.querySelector('meta[name="page.site"][content="wsjpro"]');
if (snippet || wsj_pro) {
removeDOMElement(snippet, wsj_pro);
window.location.href = url.replace('wsj.com', 'wsj.com/amp');
window.location.href = window.location.href.replace('wsj.com', 'wsj.com/amp');
}
}
let ads = document.querySelectorAll('div.wsj-ad, div.adWrapper, div.uds-ad-container');
removeDOMElement(...ads);
}
else if (matchDomain('zerohedge.com')) {

View File

@ -51,5 +51,5 @@
"webRequestBlocking",
"*://*/*"
],
"version": "3.2.9.6"
"version": "3.2.9.7"
}

View File

@ -789,5 +789,5 @@
"*://*.wyleex.com/*",
"*://webcache.googleusercontent.com/*"
],
"version": "3.2.9.6"
"version": "3.2.9.7"
}