FF: preserve sheet's disabled state in workaround for #461
This commit is contained in:
parent
3243e37fbc
commit
6fdc01201b
|
@ -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) {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user