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.head || ROOT).appendChild(document.createElement('script')).text = `
|
||||||
document.currentScript.remove();
|
document.currentScript.remove();
|
||||||
for (const {id, code} of ${JSON.stringify(pageContextQueue)}) {
|
for (const {id, code} of ${JSON.stringify(pageContextQueue)}) {
|
||||||
(
|
const el = document.getElementById(id) ||
|
||||||
document.getElementById(id) ||
|
document.querySelector('style.stylus[id="' + id + '"]');
|
||||||
document.querySelector('style.stylus[id="' + id + '"]') ||
|
if (!el) continue;
|
||||||
{}
|
const {disabled} = el.sheet;
|
||||||
).textContent = code;
|
el.textContent = code;
|
||||||
|
el.sheet.disabled = disabled;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user