6 <title>QBT_TR(Tracker editing)QBT_TR[CONTEXT=TrackerListWidget]
</title>
7 <link rel=
"stylesheet" href=
"css/style.css?v=${CACHEID}" type=
"text/css">
8 <script src=
"scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
9 <script src=
"scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
13 window
.addEventListener("DOMContentLoaded", () => {
15 defaultEventType
: "keydown",
17 "Enter": function(event
) {
18 $("editTrackerButton").click();
19 event
.preventDefault();
21 "Escape": function(event
) {
22 window
.parent
.qBittorrent
.Client
.closeWindows();
23 event
.preventDefault();
25 "Esc": function(event
) {
26 window
.parent
.qBittorrent
.Client
.closeWindows();
27 event
.preventDefault();
32 const currentUrl
= new URI().getData("url");
36 $("trackerUrl").value
= currentUrl
;
37 $("trackerUrl").focus();
39 $("editTrackerButton").addEventListener("click", (e
) => {
43 const hash
= new URI().getData("hash");
45 url
: "api/v2/torrents/editTracker",
50 newUrl
: $("trackerUrl").value
52 onComplete: function() {
53 window
.parent
.qBittorrent
.Client
.closeWindows();
62 <div style=
"text-align: center;">
64 <label for=
"trackerUrl">QBT_TR(Tracker URL:)QBT_TR[CONTEXT=TrackerListWidget]
</label>
65 <div style=
"text-align: center; padding-top: 10px;">
66 <input type=
"text" id=
"trackerUrl" style=
"width: 90%;">
69 <input type=
"button" value=
"QBT_TR(Edit)QBT_TR[CONTEXT=HttpServer]" id=
"editTrackerButton">