mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 16:42:30 -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:
@@ -37,7 +37,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
const setup = function() {
|
||||
const setup = () => {
|
||||
new Keyboard({
|
||||
defaultEventType: "keydown",
|
||||
events: {
|
||||
@@ -58,7 +58,7 @@
|
||||
$("newPluginPath").select();
|
||||
};
|
||||
|
||||
const newPluginOk = function() {
|
||||
const newPluginOk = () => {
|
||||
const path = $("newPluginPath").value.trim();
|
||||
if (path) {
|
||||
new Request({
|
||||
@@ -67,7 +67,7 @@
|
||||
data: {
|
||||
sources: path,
|
||||
},
|
||||
onRequest: function() {
|
||||
onRequest: () => {
|
||||
window.qBittorrent.SearchPlugins.closeSearchWindow("installSearchPlugin");
|
||||
}
|
||||
}).send();
|
||||
|
||||
Reference in New Issue
Block a user