diff --git a/background.js b/background.js index f01a021..9bff3a1 100644 --- a/background.js +++ b/background.js @@ -122,7 +122,7 @@ const use_google_bot_default = [ ]; var use_google_bot_custom = []; var use_google_bot = use_google_bot_default.concat(use_google_bot_custom); - +//_paywall\.sjs // block paywall-scripts individually var blockedRegexes = { 'adweek.com': /.+\.lightboxcdn\.com\/.+/, @@ -196,7 +196,7 @@ browser.storage.sync.get({ use_google_bot_custom = Object.keys(sites_custom).filter(function (key) { return sites_custom[key]['googlebot'] > 0; }).map(function (key) { - return sites_custom[key]['domain'] + return sites_custom[key]['domain'].toLowerCase(); }); use_google_bot = use_google_bot_default.slice(); @@ -204,14 +204,14 @@ browser.storage.sync.get({ block_js_custom = Object.keys(sites_custom).filter(function (key) { return sites_custom[key]['block_javascript'] > 0; }).map(function (key) { - return sites_custom[key]['domain'] + return sites_custom[key]['domain'].toLowerCase(); }); block_js = block_js_default.slice(); enabledSites = Object.keys(sites).filter(function (key) { return (sites[key] !== '' && sites[key] !== '###'); }).map(function (key) { - return sites[key]; + return sites[key].toLowerCase(); }); for (var domainIndex in enabledSites) { @@ -248,7 +248,7 @@ browser.storage.onChanged.addListener(function (changes, namespace) { use_google_bot_custom = Object.keys(sites_custom).filter(function (key) { return sites_custom[key]['googlebot'] > 0; }).map(function (key) { - return sites_custom[key]['domain'] + return sites_custom[key]['domain'].toLowerCase(); }); use_google_bot = use_google_bot_default.slice(); for (var domainIndex in use_google_bot_custom) { @@ -261,7 +261,7 @@ browser.storage.onChanged.addListener(function (changes, namespace) { block_js_custom = Object.keys(sites_custom).filter(function (key) { return sites_custom[key]['block_javascript'] > 0; }).map(function (key) { - return sites_custom[key]['domain'] + return sites_custom[key]['domain'].toLowerCase(); }); block_js = block_js_default.slice(); for (var domainIndex in block_js_custom) { diff --git a/options.js b/options.js index 08afa53..fd3ef68 100644 --- a/options.js +++ b/options.js @@ -19,7 +19,7 @@ function save_options() { }, function() { // Update status to let user know options were saved. var status = document.getElementById('status'); - status.textContent = 'Options saved.'; + status.textContent = 'Options saved.'; setTimeout(function() { status.textContent = ''; window.close(); @@ -31,9 +31,11 @@ function save_options() { active: true, currentWindow: true }, function (tabs) { + if (tabs[0].url.indexOf("http") !== -1) { browser.tabs.update(tabs[0].id, { url: tabs[0].url }); + } }); }