Fix errors at new install (on Linux Mint)

This commit is contained in:
magnolia1234 2020-03-11 19:50:40 +01:00 committed by GitHub
parent 41eae7febd
commit a879e57d1a
2 changed files with 2 additions and 2 deletions

View File

@ -458,7 +458,7 @@ chrome.webRequest.onBeforeSendHeaders.addListener(function(details) {
return { requestHeaders: requestHeaders };
}, {
urls: ['<all_urls>']
}, ['blocking', 'requestHeaders', 'extraHeaders']);
}, ['blocking', 'requestHeaders']);
chrome.tabs.onUpdated.addListener(updateBadge);
chrome.tabs.onActivated.addListener(updateBadge);

View File

@ -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
});