WebUI: Use native function for selecting elements by ID

This commit is contained in:
skomerko
2025-04-12 11:57:27 +02:00
parent 7b3aa51bb1
commit 411ca0f668
48 changed files with 1303 additions and 1303 deletions

View File

@@ -16,14 +16,14 @@
const searchParams = new URLSearchParams(window.location.search);
const host = searchParams.get("host");
$("confirmDeleteTrackerText").textContent = "QBT_TR(Are you sure you want to remove tracker %1 from all torrents?)QBT_TR[CONTEXT=TrackersFilterWidget]".replace("%1", host);
document.getElementById("confirmDeleteTrackerText").textContent = "QBT_TR(Are you sure you want to remove tracker %1 from all torrents?)QBT_TR[CONTEXT=TrackersFilterWidget]".replace("%1", host);
$("cancelBtn").focus();
$("cancelBtn").addEventListener("click", (e) => {
document.getElementById("cancelBtn").focus();
document.getElementById("cancelBtn").addEventListener("click", (e) => {
e.stopPropagation();
window.parent.qBittorrent.Client.closeFrameWindow(window);
});
$("confirmBtn").addEventListener("click", (e) => {
document.getElementById("confirmBtn").addEventListener("click", (e) => {
e.stopPropagation();
fetch("api/v2/torrents/removeTrackers", {