mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
WebUI: Use native function for selecting elements by ID
This commit is contained in:
@@ -22,15 +22,15 @@
|
||||
}
|
||||
});
|
||||
|
||||
$("urls").focus();
|
||||
$("addWebSeedsButton").addEventListener("click", (e) => {
|
||||
document.getElementById("urls").focus();
|
||||
document.getElementById("addWebSeedsButton").addEventListener("click", (e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
fetch("api/v2/torrents/addWebSeeds", {
|
||||
method: "POST",
|
||||
body: new URLSearchParams({
|
||||
hash: new URLSearchParams(window.location.search).get("hash"),
|
||||
urls: $("urls").value.split("\n").map(w => encodeURIComponent(w.trim())).filter(w => (w.length > 0)).join("|")
|
||||
urls: document.getElementById("urls").value.split("\n").map(w => encodeURIComponent(w.trim())).filter(w => (w.length > 0)).join("|")
|
||||
})
|
||||
})
|
||||
.then((response) => {
|
||||
|
||||
Reference in New Issue
Block a user