From 24c60b7e8a1359f583d505d1c786af971d141074 Mon Sep 17 00:00:00 2001 From: tophf Date: Tue, 21 Nov 2017 10:59:14 +0300 Subject: [PATCH] fixup 8a1908b7: don't protect disabled elements --- content/apply.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/content/apply.js b/content/apply.js index a78abda2..0e49743a 100644 --- a/content/apply.js +++ b/content/apply.js @@ -344,8 +344,9 @@ function initDocRootObserver() { return; } const list = []; - for (const el of styleElements.values()) { - if (el.previousElementSibling !== expectedPrevSibling) { + for (const [id, el] of styleElements.entries()) { + if (!disabledElements.has(parseInt(id.substr(ID_PREFIX.length))) && + el.previousElementSibling !== expectedPrevSibling) { list.push({el, before: expectedPrevSibling.nextSibling}); } expectedPrevSibling = el;