FF: suppress pingCS() errors in browser console

This commit is contained in:
tophf 2017-06-10 21:33:37 +03:00
parent 2687d1e167
commit 22a2086535

View File

@ -190,7 +190,12 @@ contextMenus = Object.assign({
cs.matches.some(match => {
if ((match == ALL_URLS || url.match(match))
&& (!url.startsWith('chrome') || url == NTP)) {
chrome.tabs.sendMessage(id, PING, pong => !pong && injectCS(cs, id));
chrome.tabs.sendMessage(id, PING, pong => {
if (!pong) {
injectCS(cs, id);
}
ignoreChromeError();
});
return true;
}
});