Add disable javascript functionality for theglobeandmail.com

master
Adam 2019-05-12 16:31:18 -07:00
parent 259f15244b
commit 9b3843d5c4
2 changed files with 15 additions and 1 deletions

View File

@ -225,6 +225,20 @@ browser.webRequest.onBeforeSendHeaders.addListener(function(details) {
["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) {
if (!isSiteEnabled(details)) {
return;

View File

@ -50,7 +50,7 @@ var defaultSites = {
'The Australian Financial Review': 'afr.com',
'The Boston Globe': 'bostonglobe.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 Japan Times': 'japantimes.co.jp',
'TheMarker': 'themarker.com',