Add disable javascript functionality for theglobeandmail.com

This commit is contained in:
ghost 2019-05-12 16:31:18 -07:00
parent 338622dc39
commit b0778bf8a5
2 changed files with 15 additions and 1 deletions

View file

@ -225,6 +225,20 @@ browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
["blocking"] ["blocking"]
); );
// Disable javascript for these sites
chrome.webRequest.onBeforeRequest.addListener(function(details) {
if (!isSiteEnabled(details) || details.url.indexOf("mod=rsswn") !== -1) {
return;
}
return {cancel: true};
},
{
urls: ["*://*.theglobeandmail.com/*"],
types: ["script"]
},
["blocking"]
);
browser.webRequest.onBeforeSendHeaders.addListener(function(details) { browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
if (!isSiteEnabled(details)) { if (!isSiteEnabled(details)) {
return; return;

View file

@ -50,7 +50,7 @@ var defaultSites = {
'The Australian Financial Review': 'afr.com', 'The Australian Financial Review': 'afr.com',
'The Boston Globe': 'bostonglobe.com', 'The Boston Globe': 'bostonglobe.com',
'The Business Journals': 'bizjournals.com', 'The Business Journals': 'bizjournals.com',
'The Globe and Mail': 'theglobeandmail.com', 'The Globe and Mail (javascript disabled)': 'theglobeandmail.com',
'The Herald': 'theherald.com.au', 'The Herald': 'theherald.com.au',
'The Japan Times': 'japantimes.co.jp', 'The Japan Times': 'japantimes.co.jp',
'TheMarker': 'themarker.com', 'TheMarker': 'themarker.com',