mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 22:33:34 -07:00
Remove elements directly
This commit is contained in:
parent
0f12d077c8
commit
de01fcd4a9
4 changed files with 5 additions and 5 deletions
|
@ -534,7 +534,7 @@ window.qBittorrent.ContextMenu ??= (() => {
|
|||
updateTagsSubMenu(tagList) {
|
||||
const contextTagList = $("contextTagList");
|
||||
while (contextTagList.firstChild !== null)
|
||||
contextTagList.removeChild(contextTagList.firstChild);
|
||||
contextTagList.firstChild.remove();
|
||||
|
||||
const createMenuItem = (text, imgURL, clickFn) => {
|
||||
const anchor = document.createElement("a");
|
||||
|
|
|
@ -219,7 +219,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
this.loadColumnsOrder();
|
||||
this.updateTableHeaders();
|
||||
while (this.tableBody.firstChild)
|
||||
this.tableBody.removeChild(this.tableBody.firstChild);
|
||||
this.tableBody.firstChild.remove();
|
||||
this.updateTable(true);
|
||||
}
|
||||
if (this.currentHeaderAction === "drag") {
|
||||
|
@ -398,7 +398,7 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
// recreate child nodes when reusing (enables the context menu to work correctly)
|
||||
if (ul.hasChildNodes()) {
|
||||
while (ul.firstChild)
|
||||
ul.removeChild(ul.lastChild);
|
||||
ul.lastChild.remove();
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.columns.length; ++i) {
|
||||
|
|
|
@ -862,7 +862,7 @@ vanillaSelectBox.prototype.remoteSearchIntegrateIt = function (data) {
|
|||
let self = this;
|
||||
if (data == null || data.length == 0) return;
|
||||
while(self.root.firstChild)
|
||||
self.root.removeChild(self.root.firstChild);
|
||||
self.root.firstChild.remove();
|
||||
|
||||
self.buildSelect(data);
|
||||
self.reloadTree();
|
||||
|
|
|
@ -1124,7 +1124,7 @@ const initializeWindows = () => {
|
|||
element.download = (name + ".torrent");
|
||||
document.body.appendChild(element);
|
||||
element.click();
|
||||
document.body.removeChild(element);
|
||||
element.remove();
|
||||
|
||||
// https://stackoverflow.com/questions/53560991/automatic-file-downloads-limited-to-10-files-on-chrome-browser
|
||||
await window.qBittorrent.Misc.sleep(200);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue