[all] correct external logo color theme dependency

This commit is contained in:
Maxim Kadushkin 2022-07-14 11:19:36 +03:00
parent 9350a5e089
commit 631460edf5
6 changed files with 6 additions and 6 deletions

View file

@ -321,7 +321,7 @@
} else { } else {
var elem = document.querySelector('.loading-logo img'); var elem = document.querySelector('.loading-logo img');
if (elem) { if (elem) {
(logo || logoDark) && elem.setAttribute('src', /theme-dark/.test(document.body.className) ? logoDark || logo : logo || logoDark); (logo || logoDark) && elem.setAttribute('src', /theme-(?:[a-z]+-)?dark(?:-[a-z]*)?/.test(document.body.className) ? logoDark || logo : logo || logoDark);
elem.style.opacity = 1; elem.style.opacity = 1;
} }
} }

View file

@ -285,7 +285,7 @@
} else { } else {
var elem = document.querySelector('.loading-logo img'); var elem = document.querySelector('.loading-logo img');
if (elem) { if (elem) {
(logo || logoDark) && elem.setAttribute('src', /theme-dark/.test(document.body.className) ? logoDark || logo : logo || logoDark); (logo || logoDark) && elem.setAttribute('src', /theme-(?:[a-z]+-)?dark(?:-[a-z]*)?/.test(document.body.className) ? logoDark || logo : logo || logoDark);
elem.style.opacity = 1; elem.style.opacity = 1;
} }
} }

View file

@ -335,7 +335,7 @@
} else { } else {
var elem = document.querySelector('.loading-logo img'); var elem = document.querySelector('.loading-logo img');
if (elem) { if (elem) {
(logo || logoDark) && elem.setAttribute('src', /theme-dark/.test(document.body.className) ? logoDark || logo : logo || logoDark); (logo || logoDark) && elem.setAttribute('src', /theme-(?:[a-z]+-)?dark(?:-[a-z]*)?/.test(document.body.className) ? logoDark || logo : logo || logoDark);
elem.style.opacity = 1; elem.style.opacity = 1;
} }
} }

View file

@ -329,7 +329,7 @@
} else { } else {
var elem = document.querySelector('.loading-logo img'); var elem = document.querySelector('.loading-logo img');
if (elem) { if (elem) {
(logo || logoDark) && elem.setAttribute('src', /theme-dark/.test(document.body.className) ? logoDark || logo : logo || logoDark); (logo || logoDark) && elem.setAttribute('src', /theme-(?:[a-z]+-)?dark(?:-[a-z]*)?/.test(document.body.className) ? logoDark || logo : logo || logoDark);
elem.style.opacity = 1; elem.style.opacity = 1;
} }
} }

View file

@ -357,7 +357,7 @@
} else { } else {
var elem = document.querySelector('.loading-logo img'); var elem = document.querySelector('.loading-logo img');
if (elem) { if (elem) {
(logo || logoDark) && elem.setAttribute('src', /theme-dark/.test(document.body.className) ? logoDark || logo : logo || logoDark); (logo || logoDark) && elem.setAttribute('src', /theme-(?:[a-z]+-)?dark(?:-[a-z]*)?/.test(document.body.className) ? logoDark || logo : logo || logoDark);
elem.style.opacity = 1; elem.style.opacity = 1;
} }
} }

View file

@ -343,7 +343,7 @@
} else { } else {
var elem = document.querySelector('.loading-logo img'); var elem = document.querySelector('.loading-logo img');
if (elem) { if (elem) {
(logo || logoDark) && elem.setAttribute('src', /theme-dark/.test(document.body.className) ? logoDark || logo : logo || logoDark); (logo || logoDark) && elem.setAttribute('src', /theme-(?:[a-z]+-)?dark(?:-[a-z]*)?/.test(document.body.className) ? logoDark || logo : logo || logoDark);
elem.style.opacity = 1; elem.style.opacity = 1;
} }
} }