From 22a20865350aa75955eeb74772d2a0e04a3ff2d9 Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 10 Jun 2017 21:33:37 +0300 Subject: [PATCH] FF: suppress pingCS() errors in browser console --- background.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/background.js b/background.js index 0d80d7ce..eed9a9aa 100644 --- a/background.js +++ b/background.js @@ -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; } });