diff --git a/src/webui/www/private/rename_files.html b/src/webui/www/private/rename_files.html index 9406c3f5a..bef7ce84c 100644 --- a/src/webui/www/private/rename_files.html +++ b/src/webui/www/private/rename_files.html @@ -263,7 +263,7 @@ // Adjust file enumeration count by 1 when replacing single files to prevent naming conflicts if (!fileRenamer.replaceAll) { - fileRenamer.fileEnumerationStart++; + ++fileRenamer.fileEnumerationStart; document.getElementById("file_counter").value = fileRenamer.fileEnumerationStart; } setupTable(selectedRows); diff --git a/src/webui/www/private/scripts/monkeypatch.js b/src/webui/www/private/scripts/monkeypatch.js index b38d23367..683ea7ed0 100644 --- a/src/webui/www/private/scripts/monkeypatch.js +++ b/src/webui/www/private/scripts/monkeypatch.js @@ -82,7 +82,7 @@ window.qBittorrent.MonkeyPatch ??= (() => { else if (MUI.files[source] === "loading") { let tries = 0; const checker = (function() { - tries++; + ++tries; if ((MUI.files[source] === "loading") && (tries < "100")) return; $clear(checker); diff --git a/src/webui/www/private/scripts/rename-files.js b/src/webui/www/private/scripts/rename-files.js index 3548d05b2..2f5402dce 100644 --- a/src/webui/www/private/scripts/rename-files.js +++ b/src/webui/www/private/scripts/rename-files.js @@ -89,7 +89,7 @@ window.qBittorrent.MultiRename ??= (() => { // Don't replace escape chars when they don't precede the current search being performed if (input.substring(i + escape.length, i + escape.length + search.length) !== search) { result += input[i]; - i++; + ++i; continue; } // Replace escape chars when they precede the current search being performed, unless explicitly told not to @@ -110,7 +110,7 @@ window.qBittorrent.MultiRename ??= (() => { } else { result += input[i]; - i++; + ++i; } } return result; diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index 198cb5409..b2e81856f 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -2205,7 +2205,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD const updateWebuiLocaleSelect = (selected) => { const languages = []; - for (let i = 0; i < document.getElementById("locale_select").options.length; i++) + for (let i = 0; i < document.getElementById("locale_select").options.length; ++i) languages.push(document.getElementById("locale_select").options[i].value); if (!languages.includes(selected)) { diff --git a/src/webui/www/private/views/rss.html b/src/webui/www/private/views/rss.html index e6f8f3157..57a92d3ed 100644 --- a/src/webui/www/private/views/rss.html +++ b/src/webui/www/private/views/rss.html @@ -384,7 +384,6 @@ const showRssFeed = (path) => { rssArticleTable.clear(); - let rowCount = 0; const childFeeds = new Set(); for (const row of rssFeedTable.getRowValues()) { @@ -406,10 +405,11 @@ if (path === "") visibleArticles = visibleArticles.filter((a) => !a.isRead); + let rowID = -1; visibleArticles.sort((e1, e2) => new Date(e2.date) - new Date(e1.date)) .each((torrentEntry) => { rssArticleTable.updateRowData({ - rowId: rowCount++, + rowId: ++rowID, name: torrentEntry.title, link: torrentEntry.link, torrentURL: torrentEntry.torrentURL, diff --git a/src/webui/www/private/views/rssDownloader.html b/src/webui/www/private/views/rssDownloader.html index b5d3a576a..f6ec41d2d 100644 --- a/src/webui/www/private/views/rssDownloader.html +++ b/src/webui/www/private/views/rssDownloader.html @@ -494,12 +494,12 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also const responseJSON = await response.json(); rssDownloaderRulesTable.clear(); - let rowCount = 0; + let rowID = -1; for (const rule in responseJSON) { if (!Object.hasOwn(responseJSON, rule)) continue; rssDownloaderRulesTable.updateRowData({ - rowId: rowCount++, + rowId: ++rowID, checked: responseJSON[rule].enabled, name: rule }); @@ -677,18 +677,18 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also const responseJSON = await response.json(); rssDownloaderArticlesTable.clear(); - let rowCount = 0; + let rowID = -1; for (const feed in responseJSON) { if (!Object.hasOwn(responseJSON, feed)) continue; rssDownloaderArticlesTable.updateRowData({ - rowId: rowCount++, + rowId: ++rowID, name: feed, isFeed: true }); responseJSON[feed].each((article) => { rssDownloaderArticlesTable.updateRowData({ - rowId: rowCount++, + rowId: ++rowID, name: article, isFeed: false }); @@ -788,10 +788,10 @@ Supports the formats: S01E01, 1x1, 2017.12.31 and 31.12.2017 (Date formats also setElementTitles(); rssDownloaderFeedSelectionTable.clear(); - let rowCount = 0; + let rowID = -1; feedList.forEach((feed) => { rssDownloaderFeedSelectionTable.updateRowData({ - rowId: rowCount++, + rowId: ++rowID, checked: rulesList[ruleName].affectedFeeds.contains(feed.url), name: feed.name, url: feed.url