From 7c89f7b21d876d62d456f2b51ba3287e176b505b Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 5 Oct 2020 21:08:30 +0300 Subject: [PATCH] autosort style elements on own pages too --- content/style-injector.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/style-injector.js b/content/style-injector.js index 5c9fffd0..8630bf05 100644 --- a/content/style-injector.js +++ b/content/style-injector.js @@ -8,7 +8,6 @@ self.createStyleInjector = self.INJECTED === 1 ? self.createStyleInjector : ({ const PATCH_ID = 'transition-patch'; // styles are out of order if any of these elements is injected between them const ORDERED_TAGS = new Set(['head', 'body', 'frameset', 'style', 'link']); - const IS_OWN_PAGE = Boolean(chrome.tabs); // detect Chrome 65 via a feature it added since browser version can be spoofed const isChromePre65 = chrome.app && typeof Worklet !== 'function'; const docRewriteObserver = RewriteObserver(_sort); @@ -159,7 +158,7 @@ self.createStyleInjector = self.INJECTED === 1 ? self.createStyleInjector : ({ } function _emitUpdate(value) { - _toggleObservers(!IS_OWN_PAGE && list.length); + _toggleObservers(list.length); onUpdate(); return value; }