From 079b7a39f170c19b9f342a78be1968b3659ac541 Mon Sep 17 00:00:00 2001 From: tophf Date: Fri, 17 Jul 2020 22:42:21 +0300 Subject: [PATCH] update the style list after DOM (#998) regressed in 7e6edb9e --- content/style-injector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/style-injector.js b/content/style-injector.js index 108e8cc9..5c9fffd0 100644 --- a/content/style-injector.js +++ b/content/style-injector.js @@ -86,10 +86,10 @@ self.createStyleInjector = self.INJECTED === 1 ? self.createStyleInjector : ({ const el = style.el = _createStyle(style.id, style.code); const i = list.findIndex(item => compare(item, style) > 0); table.set(style.id, style); - list.splice(i < 0 ? list.length : i, 0, style); if (isEnabled) { document.documentElement.insertBefore(el, i < 0 ? null : list[i].el); } + list.splice(i < 0 ? list.length : i, 0, style); return el; }