WebUI: enforce coding style

* WebUI: prefer `classList.toggle()` over other pattern
  Addresses: https://github.com/qbittorrent/qBittorrent/pull/23231#discussion_r2328647152
* WebUI: prefer using built-in objects Constructor
* WebUI: combine function calls

PR #23261.
This commit is contained in:
Chocobo1
2025-09-14 22:11:23 +08:00
committed by GitHub
parent 5edaf2cf10
commit b0148ef36c
6 changed files with 14 additions and 22 deletions

View File

@@ -710,10 +710,8 @@ window.qBittorrent.DynamicTable ??= (() => {
colElem.classList.toggle("reverse", isReverse);
}
const oldColElem = getCol(this.dynamicTableFixedHeaderDivId, oldColumn);
if (oldColElem !== null) {
oldColElem.classList.remove("sorted");
oldColElem.classList.remove("reverse");
}
if (oldColElem !== null)
oldColElem.classList.remove("sorted", "reverse");
}
getSelectedRowId() {