improve log monitor

This commit is contained in:
Vladimir Mandic
2024-03-03 19:53:47 -05:00
parent 1b44a16a4e
commit f7ea762073
7 changed files with 59 additions and 12 deletions
+4
View File
@@ -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);