mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-19 17:39:16 +02:00
Merge pull request #354 from madrang/beta
Fixed theme loading with extensions.
This commit is contained in:
commit
b6ef18b0d8
@ -1757,7 +1757,7 @@ function getThemeName(theme) {
|
|||||||
// init themefield
|
// init themefield
|
||||||
function initTheme() {
|
function initTheme() {
|
||||||
Array.from(document.styleSheets)
|
Array.from(document.styleSheets)
|
||||||
.filter(sheet => sheet.href.startsWith(window.location.origin))
|
.filter(sheet => sheet.href?.startsWith(window.location.origin))
|
||||||
.flatMap(sheet => Array.from(sheet.cssRules))
|
.flatMap(sheet => Array.from(sheet.cssRules))
|
||||||
.forEach(rule => {
|
.forEach(rule => {
|
||||||
var selector = rule.selectorText; // TODO: also do selector == ":root", re-run un-set props
|
var selector = rule.selectorText; // TODO: also do selector == ":root", re-run un-set props
|
||||||
|
Loading…
x
Reference in New Issue
Block a user