mirror of
https://github.com/vladmandic/automatic
synced 2026-09-02 02:50:47 +02:00
improve log monitor
This commit is contained in:
@@ -70,6 +70,10 @@ async function setTheme(val, old) {
|
||||
old = old.replace('modern/', '');
|
||||
val = val.replace('modern/', '');
|
||||
const links = Array.from(document.getElementsByTagName('link')).filter((l) => l.href.includes(old));
|
||||
if (links.length === 0) {
|
||||
log('setTheme: current theme not matched', old);
|
||||
return;
|
||||
}
|
||||
for (const link of links) {
|
||||
const href = link.href.replace(old, val);
|
||||
const res = await fetch(href);
|
||||
|
||||
Reference in New Issue
Block a user