better support for javascript disabled browsers
This commit is contained in:
parent
df5fc9890b
commit
d2a2d9459a
3 changed files with 13 additions and 3 deletions
|
@ -16,6 +16,7 @@ function changeTheme(themeName) {
|
|||
document.querySelectorAll('link.stylesheet').forEach(element => {
|
||||
if (element.id === themeName) {
|
||||
element.disabled = false;
|
||||
element.media = '';
|
||||
}
|
||||
else {
|
||||
alternates.push(element);
|
||||
|
@ -24,6 +25,7 @@ function changeTheme(themeName) {
|
|||
|
||||
alternates.forEach(element => {
|
||||
element.disabled = true;
|
||||
element.media = 'none';
|
||||
});
|
||||
|
||||
saveTheme(themeName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue