WebUI: prefer arrow functions whenever applicable

Compared to plain function, arrow function is simpler to understand (without bindings to `this`, `arguments`, `super`) and to read.
Now, plain function will only be used when this object is required.

PR #21691.
This commit is contained in:
Chocobo1
2024-11-01 04:17:41 +08:00
committed by GitHub
parent 7af6ac18aa
commit 72cbc83569
49 changed files with 574 additions and 570 deletions

View File

@@ -71,10 +71,10 @@
oldPath: oldPath,
newPath: newPath
},
onSuccess: function() {
onSuccess: () => {
window.parent.qBittorrent.Client.closeWindows();
},
onFailure: function() {
onFailure: () => {
alert("QBT_TR(Failed to update name)QBT_TR[CONTEXT=HttpServer]");
$("renameButton").disabled = false;
}