diff --git a/src/webui/www/eslint.config.mjs b/src/webui/www/eslint.config.mjs index 293288b0349..95881a303db 100644 --- a/src/webui/www/eslint.config.mjs +++ b/src/webui/www/eslint.config.mjs @@ -42,7 +42,7 @@ export default [ "Stylistic/no-mixed-operators": [ "error", { - "groups": [ + groups: [ ["&", "|", "^", "~", "<<", ">>", ">>>", "==", "!=", "===", "!==", ">", ">=", "<", "<=", "&&", "||", "in", "instanceof"] ] } @@ -52,12 +52,13 @@ export default [ "error", "double", { - "avoidEscape": true, - "allowTemplateLiterals": true + avoidEscape: true, + allowTemplateLiterals: true } ], + "Stylistic/quote-props": ["error", "consistent-as-needed"], "Stylistic/semi": "error", - "Stylistic/spaced-comment": ["error", "always", { "exceptions": ["*"] }] + "Stylistic/spaced-comment": ["error", "always", { exceptions: ["*"] }] } } ]; diff --git a/src/webui/www/private/addpeers.html b/src/webui/www/private/addpeers.html index 3110a32bed3..5ef01c2a4f0 100644 --- a/src/webui/www/private/addpeers.html +++ b/src/webui/www/private/addpeers.html @@ -39,8 +39,8 @@ fetch("api/v2/torrents/addPeers", { method: "POST", body: new URLSearchParams({ - "hashes": hash, - "peers": peers.join("|") + hashes: hash, + peers: peers.join("|") }) }) .then((response) => { diff --git a/src/webui/www/private/addtrackers.html b/src/webui/www/private/addtrackers.html index a1c303e2f10..df84f144399 100644 --- a/src/webui/www/private/addtrackers.html +++ b/src/webui/www/private/addtrackers.html @@ -30,8 +30,8 @@ fetch("api/v2/torrents/addTrackers", { method: "POST", body: new URLSearchParams({ - "hash": new URI().getData("hash"), - "urls": $("trackersUrls").value + hash: new URI().getData("hash"), + urls: $("trackersUrls").value }) }) .then((response) => { diff --git a/src/webui/www/private/addwebseeds.html b/src/webui/www/private/addwebseeds.html index 83554a988d4..c03f7687bf9 100644 --- a/src/webui/www/private/addwebseeds.html +++ b/src/webui/www/private/addwebseeds.html @@ -29,8 +29,8 @@ fetch("api/v2/torrents/addWebSeeds", { method: "POST", body: new URLSearchParams({ - "hash": new URI().getData("hash"), - "urls": $("urls").value.split("\n").map(w => encodeURIComponent(w.trim())).filter(w => (w.length > 0)).join("|") + hash: new URI().getData("hash"), + urls: $("urls").value.split("\n").map(w => encodeURIComponent(w.trim())).filter(w => (w.length > 0)).join("|") }) }) .then((response) => { diff --git a/src/webui/www/private/confirmfeeddeletion.html b/src/webui/www/private/confirmfeeddeletion.html index e8d36e056b3..bfd19d661a9 100644 --- a/src/webui/www/private/confirmfeeddeletion.html +++ b/src/webui/www/private/confirmfeeddeletion.html @@ -29,7 +29,7 @@ fetch("api/v2/rss/removeItem", { method: "POST", body: new URLSearchParams({ - "path": decodeURIComponent(path) + path: decodeURIComponent(path) }) }) .then((response) => { diff --git a/src/webui/www/private/confirmruledeletion.html b/src/webui/www/private/confirmruledeletion.html index 812b3eb64d7..b47608f00fb 100644 --- a/src/webui/www/private/confirmruledeletion.html +++ b/src/webui/www/private/confirmruledeletion.html @@ -30,7 +30,7 @@ fetch("api/v2/rss/removeRule", { method: "POST", body: new URLSearchParams({ - "ruleName": decodeURIComponent(rule) + ruleName: decodeURIComponent(rule) }) }) .then((response) => { diff --git a/src/webui/www/private/confirmtrackerdeletion.html b/src/webui/www/private/confirmtrackerdeletion.html index 790931d3d39..ecf51b3f5e8 100644 --- a/src/webui/www/private/confirmtrackerdeletion.html +++ b/src/webui/www/private/confirmtrackerdeletion.html @@ -28,8 +28,8 @@ fetch("api/v2/torrents/removeTrackers", { method: "POST", body: new URLSearchParams({ - "hash": "*", - "urls": urls + hash: "*", + urls: urls }) }) .then((response) => { diff --git a/src/webui/www/private/downloadlimit.html b/src/webui/www/private/downloadlimit.html index 296edbc230c..f9ee2cd251a 100644 --- a/src/webui/www/private/downloadlimit.html +++ b/src/webui/www/private/downloadlimit.html @@ -53,7 +53,7 @@ fetch("api/v2/transfer/setDownloadLimit", { method: "POST", body: new URLSearchParams({ - "limit": limit + limit: limit }) }) .then(async (response) => { @@ -68,8 +68,8 @@ fetch("api/v2/torrents/setDownloadLimit", { method: "POST", body: new URLSearchParams({ - "hashes": hashes.join("|"), - "limit": limit + hashes: hashes.join("|"), + limit: limit }) }) .then(async (response) => { diff --git a/src/webui/www/private/editfeedurl.html b/src/webui/www/private/editfeedurl.html index 314bc7c7e3c..83ffbd9d0e3 100644 --- a/src/webui/www/private/editfeedurl.html +++ b/src/webui/www/private/editfeedurl.html @@ -54,8 +54,8 @@ fetch("api/v2/rss/setFeedURL", { method: "POST", body: new URLSearchParams({ - "path": new URI().getData("path"), - "url": newUrl + path: new URI().getData("path"), + url: newUrl }) }) .then(async (response) => { diff --git a/src/webui/www/private/edittracker.html b/src/webui/www/private/edittracker.html index d8591ef5587..0d68c0b5da3 100644 --- a/src/webui/www/private/edittracker.html +++ b/src/webui/www/private/edittracker.html @@ -40,9 +40,9 @@ fetch("api/v2/torrents/editTracker", { method: "POST", body: new URLSearchParams({ - "hash": new URI().getData("hash"), - "origUrl": currentUrl, - "newUrl": $("trackerUrl").value + hash: new URI().getData("hash"), + origUrl: currentUrl, + newUrl: $("trackerUrl").value }) }) .then((response) => { diff --git a/src/webui/www/private/editwebseed.html b/src/webui/www/private/editwebseed.html index 99f071fe481..853fe117982 100644 --- a/src/webui/www/private/editwebseed.html +++ b/src/webui/www/private/editwebseed.html @@ -36,9 +36,9 @@ fetch("api/v2/torrents/editWebSeed", { method: "POST", body: new URLSearchParams({ - "hash": new URI().getData("hash"), - "origUrl": origUrl, - "newUrl": encodeURIComponent($("url").value.trim()) + hash: new URI().getData("hash"), + origUrl: origUrl, + newUrl: encodeURIComponent($("url").value.trim()) }) }) .then((response) => { diff --git a/src/webui/www/private/newcategory.html b/src/webui/www/private/newcategory.html index b55ab24244b..4b6d9b85999 100644 --- a/src/webui/www/private/newcategory.html +++ b/src/webui/www/private/newcategory.html @@ -75,8 +75,8 @@ fetch("api/v2/torrents/createCategory", { method: "POST", body: new URLSearchParams({ - "category": categoryName, - "savePath": savePath + category: categoryName, + savePath: savePath }) }) .then((response) => { @@ -88,8 +88,8 @@ fetch("api/v2/torrents/setCategory", { method: "POST", body: new URLSearchParams({ - "hashes": uriHashes, - "category": categoryName + hashes: uriHashes, + category: categoryName }) }) .then((response) => { @@ -111,8 +111,8 @@ fetch("api/v2/torrents/createCategory", { method: "POST", body: new URLSearchParams({ - "category": categoryName, - "savePath": savePath + category: categoryName, + savePath: savePath }) }) .then((response) => { @@ -130,8 +130,8 @@ fetch("api/v2/torrents/editCategory", { method: "POST", body: new URLSearchParams({ - "category": uriCategoryName, // category name can't be changed - "savePath": savePath + category: uriCategoryName, // category name can't be changed + savePath: savePath }) }) .then((response) => { diff --git a/src/webui/www/private/newfeed.html b/src/webui/www/private/newfeed.html index 5197189af59..2353396fc84 100644 --- a/src/webui/www/private/newfeed.html +++ b/src/webui/www/private/newfeed.html @@ -45,8 +45,8 @@ fetch("api/v2/rss/addFeed", { method: "POST", body: new URLSearchParams({ - "url": feedURL, - "path": path ? (path + "\\" + feedURL) : "" + url: feedURL, + path: path ? (path + "\\" + feedURL) : "" }) }) .then(async (response) => { diff --git a/src/webui/www/private/newfolder.html b/src/webui/www/private/newfolder.html index 26ee91fb23f..9397228194c 100644 --- a/src/webui/www/private/newfolder.html +++ b/src/webui/www/private/newfolder.html @@ -46,7 +46,7 @@ fetch("api/v2/rss/addFolder", { method: "POST", body: new URLSearchParams({ - "path": path ? (path + "\\" + folderName) : folderName + path: path ? (path + "\\" + folderName) : folderName }) }) .then(async (response) => { diff --git a/src/webui/www/private/newrule.html b/src/webui/www/private/newrule.html index 4f7d9d0504a..18f03a15425 100644 --- a/src/webui/www/private/newrule.html +++ b/src/webui/www/private/newrule.html @@ -43,8 +43,8 @@ fetch("api/v2/rss/setRule", { method: "POST", body: new URLSearchParams({ - "ruleName": name, - "ruleDef": "{}" + ruleName: name, + ruleDef: "{}" }) }) .then((response) => { diff --git a/src/webui/www/private/newtag.html b/src/webui/www/private/newtag.html index 55a4d0c7082..abc9a5c63fa 100644 --- a/src/webui/www/private/newtag.html +++ b/src/webui/www/private/newtag.html @@ -59,8 +59,8 @@ fetch("api/v2/torrents/addTags", { method: "POST", body: new URLSearchParams({ - "hashes": uriHashes, - "tags": tagName + hashes: uriHashes, + tags: tagName }) }) .then(async (response) => { @@ -78,7 +78,7 @@ fetch("api/v2/torrents/createTags", { method: "POST", body: new URLSearchParams({ - "tags": tagName + tags: tagName }) }) .then(async (response) => { diff --git a/src/webui/www/private/rename.html b/src/webui/www/private/rename.html index b37206d79c5..46c6c92daf6 100644 --- a/src/webui/www/private/rename.html +++ b/src/webui/www/private/rename.html @@ -47,8 +47,8 @@ fetch("api/v2/torrents/rename", { method: "POST", body: new URLSearchParams({ - "hash": hash, - "name": name + hash: hash, + name: name }) }) .then((response) => { diff --git a/src/webui/www/private/rename_feed.html b/src/webui/www/private/rename_feed.html index acceff8642e..06a5b58f7ef 100644 --- a/src/webui/www/private/rename_feed.html +++ b/src/webui/www/private/rename_feed.html @@ -54,8 +54,8 @@ fetch("api/v2/rss/moveItem", { method: "POST", body: new URLSearchParams({ - "itemPath": oldPath, - "destPath": newPath + itemPath: oldPath, + destPath: newPath }) }) .then(async (response) => { diff --git a/src/webui/www/private/rename_file.html b/src/webui/www/private/rename_file.html index 5333d4bb2dd..e61a2a4eeb7 100644 --- a/src/webui/www/private/rename_file.html +++ b/src/webui/www/private/rename_file.html @@ -63,9 +63,9 @@ fetch((isFolder ? "api/v2/torrents/renameFolder" : "api/v2/torrents/renameFile"), { method: "POST", body: new URLSearchParams({ - "hash": hash, - "oldPath": oldPath, - "newPath": newPath + hash: hash, + oldPath: oldPath, + newPath: newPath }) }) .then((response) => { diff --git a/src/webui/www/private/rename_files.html b/src/webui/www/private/rename_files.html index d16f75e9bd4..6c39af5c439 100644 --- a/src/webui/www/private/rename_files.html +++ b/src/webui/www/private/rename_files.html @@ -64,11 +64,11 @@ new Keyboard({ defaultEventType: "keydown", events: { - "Escape": function(event) { + Escape: (event) => { window.qBittorrent.Client.closeWindow(windowEl); event.preventDefault(); }, - "Esc": function(event) { + Esc: (event) => { window.qBittorrent.Client.closeWindow(windowEl); event.preventDefault(); } diff --git a/src/webui/www/private/rename_rule.html b/src/webui/www/private/rename_rule.html index 7a079471a00..af5d5c6e455 100644 --- a/src/webui/www/private/rename_rule.html +++ b/src/webui/www/private/rename_rule.html @@ -54,8 +54,8 @@ fetch("api/v2/rss/renameRule", { method: "POST", body: new URLSearchParams({ - "ruleName": oldName, - "newRuleName": newName + ruleName: oldName, + newRuleName: newName }) }) .then((response) => { diff --git a/src/webui/www/private/scripts/cache.js b/src/webui/www/private/scripts/cache.js index 0873ef97475..3b93c875727 100644 --- a/src/webui/www/private/scripts/cache.js +++ b/src/webui/www/private/scripts/cache.js @@ -121,7 +121,7 @@ window.qBittorrent.Cache ??= (() => { fetch("api/v2/app/setPreferences", { method: "POST", body: new URLSearchParams({ - "json": JSON.stringify(obj.data) + json: JSON.stringify(obj.data) }) }) .then(async (response) => { diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index 60ce5103ac8..62c66d4a18a 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -724,25 +724,25 @@ window.addEventListener("DOMContentLoaded", () => { }; const statusSortOrder = Object.freeze({ - "unknown": -1, - "forcedDL": 0, - "downloading": 1, - "forcedMetaDL": 2, - "metaDL": 3, - "stalledDL": 4, - "forcedUP": 5, - "uploading": 6, - "stalledUP": 7, - "checkingResumeData": 8, - "queuedDL": 9, - "queuedUP": 10, - "checkingUP": 11, - "checkingDL": 12, - "stoppedDL": 13, - "stoppedUP": 14, - "moving": 15, - "missingFiles": 16, - "error": 17 + unknown: -1, + forcedDL: 0, + downloading: 1, + forcedMetaDL: 2, + metaDL: 3, + stalledDL: 4, + forcedUP: 5, + uploading: 6, + stalledUP: 7, + checkingResumeData: 8, + queuedDL: 9, + queuedUP: 10, + checkingUP: 11, + checkingDL: 12, + stoppedDL: 13, + stoppedUP: 14, + moving: 15, + missingFiles: 16, + error: 17 }); let syncMainDataTimeoutID = -1; diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 4e11c881aa1..2812d0ee471 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -772,8 +772,8 @@ window.qBittorrent.DynamicTable ??= (() => { if (!this.rows.has(rowId)) { row = { - "full_data": {}, - "rowId": rowId + full_data: {}, + rowId: rowId }; this.rows.set(rowId, row); } @@ -1240,7 +1240,7 @@ window.qBittorrent.DynamicTable ??= (() => { if (ProgressColumnWidth < 0) ProgressColumnWidth = td.offsetWidth; td.append(new window.qBittorrent.ProgressBar.ProgressBar(progressFormatted.toFloat(), { - "width": ProgressColumnWidth - 5 + width: ProgressColumnWidth - 5 })); td.resized = false; } @@ -3265,7 +3265,7 @@ window.qBittorrent.DynamicTable ??= (() => { initColumnsFunctions: function() { this.columns["timestamp"].updateTd = function(td, row) { const date = new Date(this.getRowValue(row) * 1000).toLocaleString(); - td.set({ "text": date, "title": date }); + td.set({ text: date, title: date }); }; this.columns["type"].updateTd = function(td, row) { @@ -3293,7 +3293,7 @@ window.qBittorrent.DynamicTable ??= (() => { addClass = "logUnknown"; break; } - td.set({ "text": logLevel, "title": logLevel }); + td.set({ text: logLevel, title: logLevel }); td.getParent("tr").className = `logTableRow${addClass}`; }; }, @@ -3340,7 +3340,7 @@ window.qBittorrent.DynamicTable ??= (() => { this.columns["timestamp"].updateTd = function(td, row) { const date = new Date(this.getRowValue(row) * 1000).toLocaleString(); - td.set({ "text": date, "title": date }); + td.set({ text: date, title: date }); }; this.columns["blocked"].updateTd = function(td, row) { @@ -3353,7 +3353,7 @@ window.qBittorrent.DynamicTable ??= (() => { status = "QBT_TR(Banned)QBT_TR[CONTEXT=ExecutionLogWidget]"; addClass = "peerBanned"; } - td.set({ "text": status, "title": status }); + td.set({ text: status, title: status }); td.getParent("tr").className = `logTableRow${addClass}`; }; }, diff --git a/src/webui/www/private/scripts/file-tree.js b/src/webui/www/private/scripts/file-tree.js index 3ad30408475..3622b58422b 100644 --- a/src/webui/www/private/scripts/file-tree.js +++ b/src/webui/www/private/scripts/file-tree.js @@ -41,18 +41,18 @@ window.qBittorrent.FileTree ??= (() => { }; const FilePriority = { - "Ignored": 0, - "Normal": 1, - "High": 6, - "Maximum": 7, - "Mixed": -1 + Ignored: 0, + Normal: 1, + High: 6, + Maximum: 7, + Mixed: -1 }; Object.freeze(FilePriority); const TriState = { - "Unchecked": 0, - "Checked": 1, - "Partial": 2 + Unchecked: 0, + Checked: 1, + Partial: 2 }; Object.freeze(TriState); diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index 01a04ed2a4f..91967f84b81 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -600,7 +600,7 @@ const initializeWindows = () => { url: "api/v2/torrents/recheck", method: "post", data: { - "hashes": hashes.join("|"), + hashes: hashes.join("|"), }, onSuccess: () => { updateMainData(); @@ -694,7 +694,7 @@ const initializeWindows = () => { paddingHorizontal: 0, width: 800, height: 420, - resizeLimit: { "x": [800], "y": [420] } + resizeLimit: { x: [800], y: [420] } }); } } diff --git a/src/webui/www/private/scripts/piecesbar.js b/src/webui/www/private/scripts/piecesbar.js index 5261013b729..eb2b588cc16 100644 --- a/src/webui/www/private/scripts/piecesbar.js +++ b/src/webui/www/private/scripts/piecesbar.js @@ -48,13 +48,13 @@ window.qBittorrent.PiecesBar ??= (() => { const PiecesBar = new Class({ initialize: (pieces, parameters) => { const vals = { - "id": "piecesbar_" + (piecesBarUniqueId++), - "width": 0, - "height": 0, - "downloadingColor": "hsl(110deg 94% 27%)", // @TODO palette vars not supported for this value, apply average - "haveColor": "hsl(210deg 55% 55%)", // @TODO palette vars not supported for this value, apply average - "borderSize": 1, - "borderColor": "var(--color-border-default)" + id: "piecesbar_" + (piecesBarUniqueId++), + width: 0, + height: 0, + downloadingColor: "hsl(110deg 94% 27%)", // @TODO palette vars not supported for this value, apply average + haveColor: "hsl(210deg 55% 55%)", // @TODO palette vars not supported for this value, apply average + borderSize: 1, + borderColor: "var(--color-border-default)" }; if (parameters && (typeOf(parameters) === "object")) diff --git a/src/webui/www/private/scripts/progressbar.js b/src/webui/www/private/scripts/progressbar.js index 5b0d9b7fa93..284ed8c03c5 100644 --- a/src/webui/www/private/scripts/progressbar.js +++ b/src/webui/www/private/scripts/progressbar.js @@ -40,14 +40,14 @@ window.qBittorrent.ProgressBar ??= (() => { const ProgressBar = new Class({ initialize: (value, parameters) => { const vals = { - "id": "progressbar_" + (ProgressBars++), - "value": [value, 0].pick(), - "width": 0, - "height": 0, - "darkbg": "var(--color-background-blue)", - "darkfg": "var(--color-text-white)", - "lightbg": "var(--color-background-default)", - "lightfg": "var(--color-text-default)" + id: "progressbar_" + (ProgressBars++), + value: [value, 0].pick(), + width: 0, + height: 0, + darkbg: "var(--color-background-blue)", + darkfg: "var(--color-text-white)", + lightbg: "var(--color-background-default)", + lightfg: "var(--color-text-default)" }; if (parameters && (typeOf(parameters) === "object")) Object.append(vals, parameters); diff --git a/src/webui/www/private/scripts/prop-files.js b/src/webui/www/private/scripts/prop-files.js index 6d05571bd09..f3d6fd81157 100644 --- a/src/webui/www/private/scripts/prop-files.js +++ b/src/webui/www/private/scripts/prop-files.js @@ -311,9 +311,9 @@ window.qBittorrent.PropFiles ??= (() => { fetch("api/v2/torrents/filePrio", { method: "POST", body: new URLSearchParams({ - "hash": current_hash, - "id": fileIds.join("|"), - "priority": priority + hash: current_hash, + id: fileIds.join("|"), + priority: priority }) }) .then((response) => { @@ -580,7 +580,7 @@ window.qBittorrent.PropFiles ??= (() => { paddingHorizontal: 0, width: 800, height: 420, - resizeLimit: { "x": [800], "y": [420] } + resizeLimit: { x: [800], y: [420] } }); }; diff --git a/src/webui/www/private/scripts/prop-peers.js b/src/webui/www/private/scripts/prop-peers.js index d64ecd85f62..d4d09205c82 100644 --- a/src/webui/www/private/scripts/prop-peers.js +++ b/src/webui/www/private/scripts/prop-peers.js @@ -154,8 +154,8 @@ window.qBittorrent.PropPeers ??= (() => { fetch("api/v2/transfer/banPeers", { method: "POST", body: new URLSearchParams({ - "hash": torrentsTable.getCurrentTorrentID(), - "peers": selectedPeers.join("|") + hash: torrentsTable.getCurrentTorrentID(), + peers: selectedPeers.join("|") }) }); } diff --git a/src/webui/www/private/scripts/rename-files.js b/src/webui/www/private/scripts/rename-files.js index 029370a0505..5d4d4653022 100644 --- a/src/webui/www/private/scripts/rename-files.js +++ b/src/webui/www/private/scripts/rename-files.js @@ -10,9 +10,9 @@ window.qBittorrent.MultiRename ??= (() => { }; const AppliesTo = { - "FilenameExtension": "FilenameExtension", - "Filename": "Filename", - "Extension": "Extension" + FilenameExtension: "FilenameExtension", + Filename: "Filename", + Extension: "Extension" }; const RenameFiles = new Class({ diff --git a/src/webui/www/private/scripts/speedslider.js b/src/webui/www/private/scripts/speedslider.js index 250b70cb18f..e419a6beca6 100644 --- a/src/webui/www/private/scripts/speedslider.js +++ b/src/webui/www/private/scripts/speedslider.js @@ -90,7 +90,7 @@ MochaUI.extend({ fetch("api/v2/torrents/uploadLimit", { method: "POST", body: new URLSearchParams({ - "hashes": hashes.join("|") + hashes: hashes.join("|") }) }) .then(async (response) => { @@ -199,7 +199,7 @@ MochaUI.extend({ fetch("api/v2/torrents/downloadLimit", { method: "POST", body: new URLSearchParams({ - "hashes": hashes.join("|") + hashes: hashes.join("|") }) }) .then(async (response) => { diff --git a/src/webui/www/private/setlocation.html b/src/webui/www/private/setlocation.html index fee8d2f0980..6b45214ef9c 100644 --- a/src/webui/www/private/setlocation.html +++ b/src/webui/www/private/setlocation.html @@ -48,8 +48,8 @@ fetch("api/v2/torrents/setLocation", { method: "POST", body: new URLSearchParams({ - "hashes": new URI().getData("hashes"), - "location": location + hashes: new URI().getData("hashes"), + location: location }) }) .then(async (response) => { diff --git a/src/webui/www/private/shareratio.html b/src/webui/www/private/shareratio.html index 418fbc3f1d8..ce5131d5bbb 100644 --- a/src/webui/www/private/shareratio.html +++ b/src/webui/www/private/shareratio.html @@ -103,10 +103,10 @@ fetch("api/v2/torrents/setShareLimits", { method: "POST", body: new URLSearchParams({ - "hashes": hashesList.join("|"), - "ratioLimit": ratioLimitValue, - "seedingTimeLimit": seedingTimeLimitValue, - "inactiveSeedingTimeLimit": inactiveSeedingTimeLimitValue + hashes: hashesList.join("|"), + ratioLimit: ratioLimitValue, + seedingTimeLimit: seedingTimeLimitValue, + inactiveSeedingTimeLimit: inactiveSeedingTimeLimitValue }) }) .then(async (response) => { diff --git a/src/webui/www/private/uploadlimit.html b/src/webui/www/private/uploadlimit.html index e0667a3c81c..164da21f812 100644 --- a/src/webui/www/private/uploadlimit.html +++ b/src/webui/www/private/uploadlimit.html @@ -53,7 +53,7 @@ fetch("api/v2/transfer/setUploadLimit", { method: "POST", body: new URLSearchParams({ - "limit": limit + limit: limit }) }) .then((response) => { @@ -68,8 +68,8 @@ fetch("api/v2/torrents/setUploadLimit", { method: "POST", body: new URLSearchParams({ - "hashes": hashes.join("|"), - "limit": limit + hashes: hashes.join("|"), + limit: limit }) }) .then((response) => { diff --git a/src/webui/www/private/views/confirmAutoTMM.html b/src/webui/www/private/views/confirmAutoTMM.html index 3ec551e38e8..627de10d3d2 100644 --- a/src/webui/www/private/views/confirmAutoTMM.html +++ b/src/webui/www/private/views/confirmAutoTMM.html @@ -29,8 +29,8 @@ fetch("api/v2/torrents/setAutoManagement", { method: "POST", body: new URLSearchParams({ - "hashes": hashes.join("|"), - "enable": enable + hashes: hashes.join("|"), + enable: enable }) }) .then((response) => { diff --git a/src/webui/www/private/views/confirmRecheck.html b/src/webui/www/private/views/confirmRecheck.html index baf69e647fb..d743113c173 100644 --- a/src/webui/www/private/views/confirmRecheck.html +++ b/src/webui/www/private/views/confirmRecheck.html @@ -31,7 +31,7 @@ fetch("api/v2/torrents/recheck", { method: "POST", body: new URLSearchParams({ - "hashes": hashes.join("|") + hashes: hashes.join("|") }) }) .then((response) => { diff --git a/src/webui/www/private/views/confirmdeletion.html b/src/webui/www/private/views/confirmdeletion.html index eafef6bfabe..80f976682db 100644 --- a/src/webui/www/private/views/confirmdeletion.html +++ b/src/webui/www/private/views/confirmdeletion.html @@ -59,7 +59,7 @@ rememberButton.addEventListener("click", (e) => { window.qBittorrent.Cache.preferences.set({ data: { - "delete_torrent_content_files": deleteCB.checked + delete_torrent_content_files: deleteCB.checked }, onSuccess: () => { prefDeleteContentFiles = deleteCB.checked; @@ -80,8 +80,8 @@ fetch("api/v2/torrents/delete", { method: "POST", body: new URLSearchParams({ - "hashes": hashes.join("|"), - "deleteFiles": deleteCB.checked + hashes: hashes.join("|"), + deleteFiles: deleteCB.checked }) }) .then((response) => { diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index f79575777e8..074b723197d 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -2112,7 +2112,7 @@ method: "get", noCache: true, data: { - "iface": iface + iface: iface }, onFailure: () => { alert("Could not contact qBittorrent"); diff --git a/src/webui/www/private/views/rss.html b/src/webui/www/private/views/rss.html index c896d21147b..7e8f59d43a5 100644 --- a/src/webui/www/private/views/rss.html +++ b/src/webui/www/private/views/rss.html @@ -883,8 +883,8 @@ saveWindowSize(id); }), resizeLimit: { - "x": [800, 2500], - "y": [500, 2000] + x: [800, 2500], + y: [500, 2000] } }); }; diff --git a/src/webui/www/public/scripts/login.js b/src/webui/www/public/scripts/login.js index 63811f5edbe..cbe45e606eb 100644 --- a/src/webui/www/public/scripts/login.js +++ b/src/webui/www/public/scripts/login.js @@ -40,8 +40,8 @@ const submitLoginForm = (event) => { fetch("api/v2/auth/login", { method: "POST", body: new URLSearchParams({ - "username": usernameElement.value, - "password": passwordElement.value + username: usernameElement.value, + password: passwordElement.value }) }) .then(async (response) => {