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

@@ -28,7 +28,6 @@
});
$("feedURL").focus();
const path = new URI().getData("path");
$("submitButton").addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
@@ -42,11 +41,12 @@
$("submitButton").disabled = true;
const path = new URLSearchParams(window.location.search).get("path");
fetch("api/v2/rss/addFeed", {
method: "POST",
body: new URLSearchParams({
url: feedURL,
path: path ? (path + "\\" + feedURL) : ""
path: (((path !== null) && (path.length > 0)) ? `${path}\\${feedURL}` : "")
})
})
.then(async (response) => {