mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 21:28:07 -06:00
Clean up code
This commit is contained in:
@@ -1283,7 +1283,7 @@
|
||||
};
|
||||
|
||||
// Downloads tab
|
||||
const WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));
|
||||
const watchedFoldersTable = new HtmlTable($("watched_folders_tab"));
|
||||
|
||||
const updateTempDirEnabled = function() {
|
||||
const isTempDirEnabled = $('temppath_checkbox').getProperty('checked');
|
||||
@@ -1334,7 +1334,7 @@
|
||||
+ "</select>"
|
||||
+ "<input id='cb_watch_txt_" + pos + "' type='text' " + (disableInput ? "hidden " : "") + "/></div>";
|
||||
|
||||
WatchedFoldersTable.push([myinput, mycb]);
|
||||
watchedFoldersTable.push([myinput, mycb]);
|
||||
$('cb_watch_' + pos).setProperty('value', sel);
|
||||
if (disableInput) {
|
||||
const elt = $('cb_watch_' + pos);
|
||||
@@ -1349,14 +1349,14 @@
|
||||
for (let i = 0; i < nb_folders; ++i) {
|
||||
const fpath = $('text_watch_' + i).getProperty('value').trim();
|
||||
if (fpath.length > 0) {
|
||||
let other;
|
||||
const sel = $('cb_watch_' + i).getProperty('value').trim();
|
||||
if (sel == "other") {
|
||||
|
||||
let other;
|
||||
if (sel == "other")
|
||||
other = $('cb_watch_txt_' + i).getProperty('value').trim();
|
||||
}
|
||||
else {
|
||||
other = (sel == "watch_folder") ? 0 : 1;
|
||||
}
|
||||
else
|
||||
other = (sel === "watch_folder") ? 0 : 1;
|
||||
|
||||
folders.set(fpath, other);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user