mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-05 07:02:31 -06:00
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:
@@ -46,10 +46,10 @@
|
||||
hashes: hash,
|
||||
peers: peers.join("|")
|
||||
},
|
||||
onFailure: function() {
|
||||
onFailure: () => {
|
||||
alert("QBT_TR(Unable to add peers. Please ensure you are adhering to the IP:port format.)QBT_TR[CONTEXT=HttpServer]");
|
||||
},
|
||||
onSuccess: function() {
|
||||
onSuccess: () => {
|
||||
window.parent.qBittorrent.Client.closeWindows();
|
||||
}
|
||||
}).send();
|
||||
|
||||
Reference in New Issue
Block a user