mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-10 23:42:46 -07:00
WebUI: enforce strict comparison operators
This commit is contained in:
parent
75e2ae2fa0
commit
4945ed576a
19 changed files with 70 additions and 68 deletions
|
@ -66,7 +66,7 @@ window.qBittorrent.Download = (function() {
|
|||
$('startTorrent').checked = !pref.add_stopped_enabled;
|
||||
$('addToTopOfQueue').checked = pref.add_to_top_of_queue;
|
||||
|
||||
if (pref.auto_tmm_enabled == 1) {
|
||||
if (pref.auto_tmm_enabled === 1) {
|
||||
$('autoTMM').selectedIndex = 1;
|
||||
$('savepath').disabled = true;
|
||||
}
|
||||
|
@ -96,12 +96,12 @@ window.qBittorrent.Download = (function() {
|
|||
};
|
||||
|
||||
const changeCategorySelect = function(item) {
|
||||
if (item.value == "\\other") {
|
||||
if (item.value === "\\other") {
|
||||
item.nextElementSibling.hidden = false;
|
||||
item.nextElementSibling.value = "";
|
||||
item.nextElementSibling.select();
|
||||
|
||||
if ($('autoTMM').selectedIndex == 1)
|
||||
if ($('autoTMM').selectedIndex === 1)
|
||||
$('savepath').value = defaultSavePath;
|
||||
}
|
||||
else {
|
||||
|
@ -109,7 +109,7 @@ window.qBittorrent.Download = (function() {
|
|||
const text = item.options[item.selectedIndex].textContent;
|
||||
item.nextElementSibling.value = text;
|
||||
|
||||
if ($('autoTMM').selectedIndex == 1) {
|
||||
if ($('autoTMM').selectedIndex === 1) {
|
||||
const categoryName = item.value;
|
||||
const category = categories[categoryName];
|
||||
let savePath = defaultSavePath;
|
||||
|
@ -121,7 +121,7 @@ window.qBittorrent.Download = (function() {
|
|||
};
|
||||
|
||||
const changeTMM = function(item) {
|
||||
if (item.selectedIndex == 1) {
|
||||
if (item.selectedIndex === 1) {
|
||||
$('savepath').disabled = true;
|
||||
|
||||
const categorySelect = $('categorySelect');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue