Fix WSJ (amp homepage link)
parent
cc232d1b60
commit
9586d6de87
|
@ -52,7 +52,7 @@ Windows Registry Editor Version 5.00
|
|||
#### Android
|
||||
1. Install [Kiwi Browser](https://play.google.com/store/apps/details?id=com.kiwibrowser.browser&hl=nl) or [Yandex Browser](https://play.google.com/store/apps/details?id=com.yandex.browser&hl=en) from the Google PlayStore.
|
||||
2. For Kiwi Browser load the CRX-file in releases (auto-updating, no whitelist needed, opt-in for custom sites not working (use kiwi-custom crx; updates to latest regular version)).
|
||||
3. For Yandex Browser follow Chrome instructions above (load unpacked; step 6: pick manifest.json instead of the folder). If it fails try Total Commander (as file manager).\
|
||||
3. For Yandex Browser follow Chrome instructions above (load unpacked; step 6: pick manifest.json instead of the folder). If it fails try a few times or use Total Commander (as file manager). You can use a Git client like MGit to clone (and update) this repository on your mobile device.\
|
||||
For custom sites copy manifest.json from custom folder to the main extension folder (optional permissions are lost on reload).
|
||||
|
||||
#### Firefox
|
||||
|
|
|
@ -283,6 +283,7 @@ var blockedRegexes = {
|
|||
'chronicle.com': /(\.blueconic\.net\/|\.chronicle\.com\/(common\/)?(che-auth0-user|script)\.js)/,
|
||||
'clarin.com': /js\.matheranalytics\.com\//,
|
||||
'cmjornal.pt': /cdn\.ampproject\.org\/v\d\/amp-(access|(sticky-)?ad)-.+\.js/,
|
||||
'commentary.org': /\.commentary\.org\/.+\/js\/dg-locker-public\.js/,
|
||||
'corriere.it': /(\.tinypass\.com\/|\.rcsobjects\.it\/rcs_(cpmt|tracking-service)\/|\.corriereobjects\.it\/.+\/js\/(_paywall\.sjs|tracking\/)|\.userzoom\.com\/files\/js\/)/,
|
||||
'dallasnews.com': /(\.blueconic\.net\/|js\.matheranalytics\.com\/)/,
|
||||
'digiday.com': /cdn.\.tinypass\.com\//,
|
||||
|
|
|
@ -12,6 +12,7 @@ Fix Gestion & El Comercio (Peru)
|
|||
Fix Grupo Vocento (Spain)
|
||||
Fix Financial News (London)
|
||||
Fix The Athletic (podcast)
|
||||
Fix WSJ (amp homepage link)
|
||||
Update remove cookies (faster)
|
||||
|
||||
* v2.3.0.1 (2021-07-26)
|
||||
|
|
|
@ -2660,6 +2660,7 @@ else if (matchDomain('washingtonpost.com')) {
|
|||
}
|
||||
|
||||
else if (matchDomain('wsj.com') && !matchDomain('cn.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)
|
||||
|
@ -2667,14 +2668,20 @@ else if (matchDomain('wsj.com') && !matchDomain('cn.wsj.com')) {
|
|||
}
|
||||
let wsj_ads = document.querySelectorAll('div.wsj-ad');
|
||||
removeDOMElement(...wsj_ads);
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
let url = window.location.href;
|
||||
let snippet = document.querySelector('.snippet-promotion');
|
||||
let wsj_pro = document.querySelector('meta[name="page.site"][content="wsjpro"]');
|
||||
if (snippet || wsj_pro) {
|
||||
window.location.href = url.replace('wsj.com', 'wsj.com/amp');
|
||||
}
|
||||
});
|
||||
if (url.includes('/amp/')) {
|
||||
let masthead_link = document.querySelector('div.masthead > a[href*="/articles/"]');
|
||||
if (masthead_link)
|
||||
masthead_link.href = 'https://www.wsj.com';
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
let snippet = document.querySelector('.snippet-promotion');
|
||||
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');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
else if ((domain = matchDomain(usa_mcc_domains)) || document.querySelector('script[src^="https://media.mcclatchyinteractive.com/"]') || window.location.href.match(/\/\/amp\..+\.com\/(.+\/)?article(\d){8,}\.html/)) {
|
||||
|
|
Loading…
Reference in New Issue