Fix code style for HTML/JS files
This commit is contained in:
+1
-1
@@ -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
@@ -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
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user