diff --git a/background.js b/background.js index 467a625..885a1c5 100644 --- a/background.js +++ b/background.js @@ -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; diff --git a/options.js b/options.js index 8345791..24594c0 100644 --- a/options.js +++ b/options.js @@ -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',