diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index dcaf5ee2e..6d44d36da 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -349,7 +349,7 @@ window.qBittorrent.DynamicTable ??= (() => { } }, - setupDynamicTableHeaderContextMenuClass: function() { + setupDynamicTableHeaderContextMenuClass: () => { DynamicTableHeaderContextMenuClass ??= class extends window.qBittorrent.ContextMenu.ContextMenu { updateMenuItems() { for (let i = 0; i < this.dynamicTable.columns.length; ++i) { @@ -2316,7 +2316,7 @@ window.qBittorrent.DynamicTable ??= (() => { this.updateGlobalCheckbox(); }, - _sortNodesByColumn: function(nodes, column) { + _sortNodesByColumn: (nodes, column) => { nodes.sort((row1, row2) => { // list folders before files when sorting by name if (column.name === "original") { @@ -2633,7 +2633,7 @@ window.qBittorrent.DynamicTable ??= (() => { this.columns["availability"].updateTd = displayPercentage; }, - _sortNodesByColumn: function(nodes, column) { + _sortNodesByColumn: (nodes, column) => { nodes.sort((row1, row2) => { // list folders before files when sorting by name if (column.name === "name") { @@ -3012,7 +3012,7 @@ window.qBittorrent.DynamicTable ??= (() => { this.newColumn("checked", "", "", 30, true); this.newColumn("name", "", "", -1, true); - this.columns["checked"].updateTd = function(td, row) { + this.columns["checked"].updateTd = (td, row) => { if ($(`cbRssDlRule${row.rowId}`) === null) { const checkbox = document.createElement("input"); checkbox.type = "checkbox"; @@ -3110,7 +3110,7 @@ window.qBittorrent.DynamicTable ??= (() => { this.newColumn("checked", "", "", 30, true); this.newColumn("name", "", "", -1, true); - this.columns["checked"].updateTd = function(td, row) { + this.columns["checked"].updateTd = (td, row) => { if ($(`cbRssDlFeed${row.rowId}`) === null) { const checkbox = document.createElement("input"); checkbox.type = "checkbox"; diff --git a/src/webui/www/private/scripts/file-tree.js b/src/webui/www/private/scripts/file-tree.js index 3622b5842..06fae5394 100644 --- a/src/webui/www/private/scripts/file-tree.js +++ b/src/webui/www/private/scripts/file-tree.js @@ -103,7 +103,7 @@ window.qBittorrent.FileTree ??= (() => { return nodes; }, - _getArrayOfNodes: function(node, array) { + _getArrayOfNodes: (node, array) => { array.push(node); node.children.each((child) => { this._getArrayOfNodes(child, array); diff --git a/src/webui/www/private/scripts/pathAutofill.js b/src/webui/www/private/scripts/pathAutofill.js index 2e260f145..601b9a0bf 100644 --- a/src/webui/www/private/scripts/pathAutofill.js +++ b/src/webui/www/private/scripts/pathAutofill.js @@ -73,7 +73,7 @@ window.qBittorrent.pathAutofill ??= (() => { .catch(error => {}); }; - function attachPathAutofill() { + const attachPathAutofill = () => { const directoryInputs = document.querySelectorAll(".pathDirectory:not(.pathAutoFillInitialized)"); for (const input of directoryInputs) { input.addEventListener("input", function() { showPathSuggestions(this, "dirs"); }); diff --git a/src/webui/www/private/scripts/search.js b/src/webui/www/private/scripts/search.js index 7c56fe8a2..d8845f464 100644 --- a/src/webui/www/private/scripts/search.js +++ b/src/webui/www/private/scripts/search.js @@ -773,7 +773,7 @@ window.qBittorrent.Search ??= (() => { $("numSearchResultsVisible").textContent = searchResultsTable.getFilteredAndSortedRows().length; }; - const loadSearchResultsData = function(searchId) { + const loadSearchResultsData = (searchId) => { const state = searchState.get(searchId); const url = new URL("api/v2/search/results", window.location); url.search = new URLSearchParams({