From e84afd9a20ffbfe04d77a9809812d9123b8268ae Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 3 Feb 2018 06:31:43 +0300 Subject: [PATCH] fix a copypaste error --- content/install-hook-userstyles.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/install-hook-userstyles.js b/content/install-hook-userstyles.js index d565162d..09f3f832 100644 --- a/content/install-hook-userstyles.js +++ b/content/install-hook-userstyles.js @@ -297,6 +297,7 @@ function orphanCheck() { + // TODO: switch to install-hook-usercss.js impl, and remove explicit orphanCheck() calls if (chrome.i18n && chrome.i18n.getUILanguage()) { return true; } @@ -307,7 +308,7 @@ ['', 'Chrome', 'Opera'].forEach(browser => document.addEventListener('stylish' + type + browser, onClick))); try { - chrome.runtime.onMessage.addListener(onMessage); + chrome.runtime.onMessage.removeListener(onMessage); } catch (e) {} } })();