summaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-08-26 17:26:30 -0700
committerGitHub <noreply@github.com>2019-08-26 17:26:30 -0700
commit7bf215617c9e54228bd5f5fe44b29f7b99de1abc (patch)
treea12703b80141d99e2003d832eab95cb61c1d8cc8 /ext/bg/js/backend.js
parent6c3671b3d98896ea710d70927024db4d2cbbad06 (diff)
parentc49f3c78383350b250c1dd823559bb8231f76e54 (diff)
Merge pull request #187 from toasted-nutbread/suppress-runtime-lasterror-messages
Suppress messages about unchecked runtime.lastError
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index d49286d0..d95cb82d 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -57,9 +57,10 @@ class Backend {
this.anki = new AnkiNull();
}
+ const callback = () => this.checkLastError(chrome.runtime.lastError);
chrome.tabs.query({}, tabs => {
for (const tab of tabs) {
- chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: options}, () => null);
+ chrome.tabs.sendMessage(tab.id, {action: 'optionsSet', params: options}, callback);
}
});
}
@@ -147,6 +148,10 @@ class Backend {
chrome.browserAction.setBadgeText({text});
}
}
+
+ checkLastError(e) {
+ // NOP
+ }
}
window.yomichan_backend = new Backend();