diff --git a/content/apply.js b/content/apply.js index c332fc11..ac0e03d3 100644 --- a/content/apply.js +++ b/content/apply.js @@ -333,11 +333,12 @@ (document.head || ROOT).appendChild(document.createElement('script')).text = ` document.currentScript.remove(); for (const {id, code} of ${JSON.stringify(pageContextQueue)}) { - ( - document.getElementById(id) || - document.querySelector('style.stylus[id="' + id + '"]') || - {} - ).textContent = code; + const el = document.getElementById(id) || + document.querySelector('style.stylus[id="' + id + '"]'); + if (!el) continue; + const {disabled} = el.sheet; + el.textContent = code; + el.sheet.disabled = disabled; } `; } catch (e) {}