Fix Economist (block external script)
This commit is contained in:
parent
f63d7be419
commit
3391964ac9
@ -224,7 +224,8 @@ var blockedRegexes = {
|
||||
'thenation.com': /thenation\.com\/.+\/paywall-script\.php/,
|
||||
'haaretz.co.il': /haaretz\.co\.il\/htz\/js\/inter\.js/,
|
||||
'nzherald.co.nz': /nzherald\.co\.nz\/.+\/headjs\/.+\.js/,
|
||||
'businessinsider.com': /(.+\.tinypass\.com\/.+|cdn\.onesignal\.com\/sdks\/.+\.js)/
|
||||
'businessinsider.com': /(.+\.tinypass\.com\/.+|cdn\.onesignal\.com\/sdks\/.+\.js)/,
|
||||
'economist.com': /.+\.tinypass\.com\/.+/
|
||||
};
|
||||
|
||||
const userAgentDesktop = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
|
||||
@ -298,7 +299,7 @@ chrome.webRequest.onBeforeRequest.addListener(function(details) {
|
||||
return {cancel: true};
|
||||
},
|
||||
{
|
||||
urls: ["*://*.thestar.com/*", "*://*.economist.com/*", "*://*.theglobeandmail.com/*", "*://*.afr.com/*", "*://*.bizjournals.com/*", "*://*.bostonglobe.com/*"],
|
||||
urls: ["*://*.thestar.com/*", "*://*.theglobeandmail.com/*", "*://*.afr.com/*", "*://*.bizjournals.com/*", "*://*.bostonglobe.com/*"],
|
||||
types: ["script"]
|
||||
},
|
||||
["blocking"]
|
||||
|
@ -200,6 +200,11 @@ if (window.location.href.indexOf("leparisien.fr") !== -1) {
|
||||
}, 300); // Delay (in milliseconds)
|
||||
}
|
||||
|
||||
if (window.location.href.indexOf("economist.com") !== -1) {
|
||||
const wrapper = document.getElementById('bottom-page-wrapper');
|
||||
removeDOMElement(wrapper);
|
||||
}
|
||||
|
||||
function removeDOMElement(...elements) {
|
||||
for (let element of elements) {
|
||||
if (element)
|
||||
|
@ -71,7 +71,7 @@ var defaultSites = {
|
||||
'The Boston Globe (javascript disabled)': 'bostonglobe.com',
|
||||
'The Business Journals (javascript disabled)': 'bizjournals.com',
|
||||
'The Canberra Times': 'canberratimes.com.au',
|
||||
'The Economist (javascript disabled)': 'economist.com',
|
||||
'The Economist': 'economist.com',
|
||||
'The Globe and Mail (javascript disabled)': 'theglobeandmail.com',
|
||||
'The Hindu': 'thehindu.com',
|
||||
'The Irish Times': 'irishtimes.com',
|
||||
|
Loading…
x
Reference in New Issue
Block a user