From a879e57d1a4fa21865d5fe788bfd64717ed8ce98 Mon Sep 17 00:00:00 2001 From: magnolia1234 <7676006-magnolia1234@users.noreply.gitlab.com> Date: Wed, 11 Mar 2020 19:50:40 +0100 Subject: [PATCH] Fix errors at new install (on Linux Mint) --- background.js | 2 +- options.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/background.js b/background.js index 3edd17d..510808e 100755 --- a/background.js +++ b/background.js @@ -458,7 +458,7 @@ chrome.webRequest.onBeforeSendHeaders.addListener(function(details) { return { requestHeaders: requestHeaders }; }, { urls: [''] -}, ['blocking', 'requestHeaders', 'extraHeaders']); +}, ['blocking', 'requestHeaders']); chrome.tabs.onUpdated.addListener(updateBadge); chrome.tabs.onActivated.addListener(updateBadge); diff --git a/options.js b/options.js index e9175a4..06b1502 100755 --- a/options.js +++ b/options.js @@ -31,7 +31,7 @@ function save_options() { active: true, currentWindow: true }, function (tabs) { - if (tabs[0].url.indexOf("http") !== -1) { + if (tabs[0].url && tabs[0].url.indexOf("http") !== -1) { chrome.tabs.update(tabs[0].id, { url: tabs[0].url });