mirror of
https://github.com/mue/mue.git
synced 2026-06-12 11:38:53 +02:00
feat: add no animations setting back, text shadow/border option
This commit is contained in:
@@ -238,5 +238,9 @@
|
||||
{
|
||||
"name": "offlineMode",
|
||||
"value": false
|
||||
},
|
||||
{
|
||||
"name": "animations",
|
||||
"value": true
|
||||
}
|
||||
]
|
||||
|
||||
@@ -57,6 +57,28 @@ export function loadSettings(hotreload) {
|
||||
});
|
||||
}
|
||||
|
||||
if (localStorage.getItem('animations') === 'false') {
|
||||
document.body.classList.add('no-animations');
|
||||
} else {
|
||||
document.body.classList.remove('no-animations');
|
||||
}
|
||||
|
||||
if (localStorage.getItem('textBorder') === 'true') {
|
||||
const elements = ['greeting', 'clock', 'quote', 'quoteauthor'];
|
||||
elements.forEach((element) => {
|
||||
try {
|
||||
document.querySelector('.' + element).classList.add('textBorder')
|
||||
} catch (e) {}
|
||||
});
|
||||
} else {
|
||||
const elements = ['greeting', 'clock', 'quote', 'quoteauthor'];
|
||||
elements.forEach((element) => {
|
||||
try {
|
||||
document.querySelector('.' + element).classList.remove('textBorder')
|
||||
} catch (e) {}
|
||||
});
|
||||
}
|
||||
|
||||
const css = localStorage.getItem('customcss');
|
||||
if (css) {
|
||||
document.head.insertAdjacentHTML('beforeend', '<style id="customcss">' + css + '</style>');
|
||||
|
||||
Reference in New Issue
Block a user