WebUI: prefer arrow function in callbacks

This commit is contained in:
Chocobo1
2024-05-27 22:57:28 +08:00
parent 55bff4f07a
commit 24a1537cdd
32 changed files with 215 additions and 214 deletions

View File

@@ -29,7 +29,7 @@
}
}).activate();
window.addEvent("domready", function() {
window.addEvent("domready", () => {
const path = new URI().getData("path");
// set text field to current value
@@ -37,7 +37,7 @@
$("setLocation").value = decodeURIComponent(path);
$("setLocation").focus();
$("setLocationButton").addEvent("click", function(e) {
$("setLocationButton").addEvent("click", (e) => {
new Event(e).stop();
// check field
const location = $("setLocation").value.trim();