fix(theme/book): Disable stylesheets by property, not attribute
Closes #553.
This commit is contained in:
parent
7b356b7530
commit
05a0d7e625
|
@ -151,21 +151,21 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||||
let ace_theme;
|
let ace_theme;
|
||||||
|
|
||||||
if (theme == 'coal' || theme == 'navy') {
|
if (theme == 'coal' || theme == 'navy') {
|
||||||
document.querySelector("[href='ayu-highlight.css']").setAttribute('disabled', true);
|
document.querySelector("[href='ayu-highlight.css']").disabled = true;
|
||||||
document.querySelector("[href='tomorrow-night.css']").removeAttribute('disabled');
|
document.querySelector("[href='tomorrow-night.css']").disabled = false;
|
||||||
document.querySelector("[href='highlight.css']").setAttribute('disabled', true);
|
document.querySelector("[href='highlight.css']").disabled = true;
|
||||||
|
|
||||||
ace_theme = "ace/theme/tomorrow_night";
|
ace_theme = "ace/theme/tomorrow_night";
|
||||||
} else if (theme == 'ayu') {
|
} else if (theme == 'ayu') {
|
||||||
document.querySelector("[href='ayu-highlight.css']").removeAttribute('disabled');
|
document.querySelector("[href='ayu-highlight.css']").disabled = false;
|
||||||
document.querySelector("[href='tomorrow-night.css']").setAttribute('disabled', true);
|
document.querySelector("[href='tomorrow-night.css']").disabled = true;
|
||||||
document.querySelector("[href='highlight.css']").setAttribute('disabled', true);
|
document.querySelector("[href='highlight.css']").disabled = true;
|
||||||
|
|
||||||
ace_theme = "ace/theme/tomorrow_night";
|
ace_theme = "ace/theme/tomorrow_night";
|
||||||
} else {
|
} else {
|
||||||
document.querySelector("[href='ayu-highlight.css']").setAttribute('disabled', true);
|
document.querySelector("[href='ayu-highlight.css']").disabled = true;
|
||||||
document.querySelector("[href='tomorrow-night.css']").setAttribute('disabled', true);
|
document.querySelector("[href='tomorrow-night.css']").disabled = true;
|
||||||
document.querySelector("[href='highlight.css']").removeAttribute('disabled');
|
document.querySelector("[href='highlight.css']").disabled = false;
|
||||||
|
|
||||||
ace_theme = "ace/theme/dawn";
|
ace_theme = "ace/theme/dawn";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue