WebUI: use native API for accessing query string

PR #22141.
This commit is contained in:
Chocobo1
2025-01-12 21:36:59 +08:00
committed by GitHub
parent 11991e62f5
commit c622d50814
28 changed files with 292 additions and 203 deletions

View File

@@ -13,7 +13,6 @@
"use strict";
window.addEventListener("DOMContentLoaded", () => {
const paths = new URI().getData("paths").split("|");
$("cancelBtn").focus();
$("cancelBtn").addEventListener("click", (e) => {
e.preventDefault();
@@ -25,7 +24,8 @@
e.stopPropagation();
let completionCount = 0;
paths.forEach((path) => {
const paths = new URLSearchParams(window.location.search).get("paths").split("|");
for (const path of paths) {
fetch("api/v2/rss/removeItem", {
method: "POST",
body: new URLSearchParams({
@@ -42,7 +42,7 @@
window.parent.qBittorrent.Client.closeFrameWindow(window);
}
});
});
}
});
});
</script>