fix js problems pointed-out by linter

This commit is contained in:
Stiliyan Tonev (Bark) 2025-05-12 15:50:16 +03:00
commit 7b21b078c1

View file

@ -180,14 +180,10 @@ window.qBittorrent.PropTrackers ??= (() => {
const addTrackerFN = () => {
const selectedTorrents = torrentsTable.selectedRowsIds();
if (current_hash.length === 0)
{
return;
}
if (selectedTorrents.length !== 0)
{
current_hash = selectedTorrents.map(encodeURIComponent).join("|");
}
new MochaUI.Window({
id: "trackersPage",
@ -237,14 +233,10 @@ window.qBittorrent.PropTrackers ??= (() => {
const removeTrackerFN = (element) => {
const selectedTorrents = torrentsTable.selectedRowsIds();
if (current_hash.length === 0)
{
return;
}
if (selectedTorrents.length !== 0)
{
current_hash = selectedTorrents.map(encodeURIComponent).join("|");
}
fetch("api/v2/torrents/removeTrackers", {
method: "POST",