diff --git a/background.js b/background.js index 02e09042..b4a7f552 100644 --- a/background.js +++ b/background.js @@ -1,4 +1,4 @@ -/* global getDatabase, getStyles, saveStyle, reportError */ +/* global getDatabase, getStyles, saveStyle */ 'use strict'; chrome.webNavigation.onBeforeNavigate.addListener(data => { @@ -161,7 +161,10 @@ Object.keys(contextMenus).forEach(id => { // Get the DB so that any first run actions will be performed immediately // when the background page loads. -getDatabase(function() {}, reportError); +getDatabase(() => {}, (...args) => { + args.forEach(arg => 'message' in arg && console.error(arg.message)); +}); + // When an edit page gets attached or detached, remember its state // so we can do the same to the next one to open. diff --git a/storage.js b/storage.js index e7b7babd..2ea84ecc 100644 --- a/storage.js +++ b/storage.js @@ -1,4 +1,3 @@ -/* global cachedStyles: true */ 'use strict'; const RX_NAMESPACE = new RegExp([/[\s\r\n]*/, @@ -496,15 +495,6 @@ function cleanupCachedFilters({force = false} = {}) { } -function reportError(...args) { - for (const arg of args) { - if ('message' in arg) { - console.log(arg.message); - } - } -} - - function getDomains(url) { if (url.indexOf('file:') == 0) { return [];