Fix code style for HTML/JS files

This commit is contained in:
Alex X
2024-04-30 09:59:53 +03:00
parent b8b90aba51
commit fd6014c11f
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -46,7 +46,7 @@
r = await fetch('api/config', {method: 'POST', body: editor.getValue()}); r = await fetch('api/config', {method: 'POST', body: editor.getValue()});
if (r.ok) { if (r.ok) {
alert('OK'); alert('OK');
fetch('api/restart', {method: 'POST'}); await fetch('api/restart', {method: 'POST'});
} else { } else {
alert(await r.text()); alert(await r.text());
} }
+2 -2
View File
@@ -82,8 +82,8 @@
.replace(/\n/g, '<br>'); .replace(/\n/g, '<br>');
} }
let reverseBtn = document.getElementById('reverse'); const reverseBtn = document.getElementById('reverse');
let update = document.getElementById('update'); const update = document.getElementById('update');
let reverseOrder = false; let reverseOrder = false;
let autoUpdateEnabled = true; let autoUpdateEnabled = true;
+2 -1
View File
@@ -179,7 +179,8 @@ document.addEventListener('DOMContentLoaded', () => {
// Update the editor theme based on the dark mode state // Update the editor theme based on the dark mode state
const updateEditorTheme = () => { const updateEditorTheme = () => {
if (typeof editor !== 'undefined') { if (typeof editor !== 'undefined') {
editor.setTheme(isDarkModeEnabled() ? "ace/theme/tomorrow_night_eighties" : "ace/theme/github"); } editor.setTheme(isDarkModeEnabled() ? 'ace/theme/tomorrow_night_eighties' : 'ace/theme/github');
}
}; };
// Initial update for dark mode and toggle button // Initial update for dark mode and toggle button