mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-26 20:31:11 +08:00
Fix code style for HTML/JS files
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
r = await fetch('api/config', {method: 'POST', body: editor.getValue()});
|
||||
if (r.ok) {
|
||||
alert('OK');
|
||||
fetch('api/restart', {method: 'POST'});
|
||||
await fetch('api/restart', {method: 'POST'});
|
||||
} else {
|
||||
alert(await r.text());
|
||||
}
|
||||
|
@@ -82,8 +82,8 @@
|
||||
.replace(/\n/g, '<br>');
|
||||
}
|
||||
|
||||
let reverseBtn = document.getElementById('reverse');
|
||||
let update = document.getElementById('update');
|
||||
const reverseBtn = document.getElementById('reverse');
|
||||
const update = document.getElementById('update');
|
||||
|
||||
let reverseOrder = false;
|
||||
let autoUpdateEnabled = true;
|
||||
|
@@ -179,7 +179,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
// Update the editor theme based on the dark mode state
|
||||
const updateEditorTheme = () => {
|
||||
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
|
||||
|
Reference in New Issue
Block a user