From 054df4fe271812cf8bfa1d86a93a5769ef2aef34 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 24 Feb 2020 15:31:03 +0300 Subject: [PATCH] fixup! call updateCount explicitly on extension pages --- content/apply.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/apply.js b/content/apply.js index 97a3f819..0e0d098a 100644 --- a/content/apply.js +++ b/content/apply.js @@ -18,7 +18,12 @@ self.INJECTED !== 1 && (() => { // if chrome.tabs is absent it's a web page, otherwise we'll check for popup/options as those aren't tabs let isTab = !chrome.tabs; - if (chrome.tabs) chrome.tabs.getCurrent(tab => (isTab = Boolean(tab))); + if (chrome.tabs) { + chrome.tabs.getCurrent(tab => { + isTab = Boolean(tab); + if (tab && styleInjector.list.length) updateCount(); + }); + } // save it now because chrome.runtime will be unavailable in the orphaned script const orphanEventId = chrome.runtime.id;