mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
WebUI: Replace getElements & getChildren
This PR further reduces Mootools usage. PR #22220.
This commit is contained in:
@@ -490,7 +490,8 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
const categoryList = document.getElementById("categoryFilterList");
|
||||
if (!categoryList)
|
||||
return;
|
||||
categoryList.getChildren().each(c => c.destroy());
|
||||
|
||||
[...categoryList.children].forEach((el) => { el.destroy(); });
|
||||
|
||||
const categoryItemTemplate = document.getElementById("categoryFilterItem");
|
||||
|
||||
@@ -611,7 +612,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
if (tagFilterList === null)
|
||||
return;
|
||||
|
||||
tagFilterList.getChildren().each(c => c.destroy());
|
||||
[...tagFilterList.children].forEach((el) => { el.destroy(); });
|
||||
|
||||
const tagItemTemplate = document.getElementById("tagFilterItem");
|
||||
|
||||
@@ -664,7 +665,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||
if (trackerFilterList === null)
|
||||
return;
|
||||
|
||||
trackerFilterList.getChildren().each(c => c.destroy());
|
||||
[...trackerFilterList.children].forEach((el) => { el.destroy(); });
|
||||
|
||||
const trackerItemTemplate = document.getElementById("trackerFilterItem");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user