mirror of
https://github.com/Carve/qbittorrent-webui-cjratliff.com.git
synced 2025-02-28 23:50:57 +01:00
53 lines
1.8 KiB
HTML
53 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="${LANG}">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Remove tracker</title>
|
|
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
|
|
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
|
|
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
|
|
<script>
|
|
"use strict";
|
|
|
|
window.addEventListener("DOMContentLoaded", () => {
|
|
const host = new URI().getData("host");
|
|
const urls = new URI().getData("urls");
|
|
$("confirmDeleteTrackerText").textContent = "Are you sure you want to remove tracker %1 from all torrents?".replace("%1", `"${host}"`);
|
|
|
|
$("cancelBtn").focus();
|
|
$("cancelBtn").addEvent("click", (e) => {
|
|
e.stopPropagation();
|
|
window.parent.qBittorrent.Client.closeWindows();
|
|
});
|
|
$("confirmBtn").addEvent("click", (e) => {
|
|
e.stopPropagation();
|
|
const cmd = "api/v2/torrents/removeTrackers";
|
|
new Request({
|
|
url: cmd,
|
|
method: "post",
|
|
data: {
|
|
hash: "*",
|
|
urls: urls,
|
|
},
|
|
onComplete: function() {
|
|
window.parent.qBittorrent.Client.closeWindows();
|
|
}
|
|
}).send();
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div style="padding: 10px 10px 0px 10px;">
|
|
<p id="confirmDeleteTrackerText"></p>
|
|
<div style="text-align: right;">
|
|
<input type="button" id="cancelBtn" value="Cancel">
|
|
<input type="button" id="confirmBtn" value="Remove">
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|