parent
5d0e72ba50
commit
c40062189b
|
@ -127,10 +127,17 @@ export class ThemeService {
|
||||||
|
|
||||||
private loadThemeStyle (name: string) {
|
private loadThemeStyle (name: string) {
|
||||||
const links = document.getElementsByTagName('link')
|
const links = document.getElementsByTagName('link')
|
||||||
|
|
||||||
for (let i = 0; i < links.length; i++) {
|
for (let i = 0; i < links.length; i++) {
|
||||||
const link = links[i]
|
const link = links[i]
|
||||||
if (link.getAttribute('rel').includes('style') && link.getAttribute('title')) {
|
if (link.getAttribute('rel').includes('style') && link.getAttribute('title')) {
|
||||||
link.disabled = link.getAttribute('title') !== name
|
link.disabled = link.getAttribute('title') !== name
|
||||||
|
|
||||||
|
if (!link.disabled) {
|
||||||
|
link.onload = () => this.injectColorPalette()
|
||||||
|
} else {
|
||||||
|
link.onload = undefined
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue