WebUI: Replace Mootools class list manipulation methods

All `addClass()`, `removeClass()` and `hasClass()` instances were changed to use `classList` equivalent:
https://developer.mozilla.org/en-US/docs/Web/API/Element/classList

PR #21946.

---------

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
skomerko
2024-12-08 09:12:57 +01:00
committed by GitHub
parent 9f0fa4c215
commit 7080f85b59
15 changed files with 143 additions and 167 deletions

View File

@@ -43,8 +43,8 @@ window.qBittorrent.PropPeers ??= (() => {
let show_flags = true;
const loadTorrentPeersData = () => {
if ($("propPeers").hasClass("invisible")
|| $("propertiesPanel_collapseToggle").hasClass("panel-expand")) {
if ($("propPeers").classList.contains("invisible")
|| $("propertiesPanel_collapseToggle").classList.contains("panel-expand")) {
syncTorrentPeersLastResponseId = 0;
torrentPeersTable.clear();
return;