2 <html lang=
"${LANG}" class=
"dark">
6 <title>QBT_TR(Add Peers)QBT_TR[CONTEXT=PeersAdditionDialog]
</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>
10 <script src=
"scripts/localpreferences.js?v=${CACHEID}"></script>
11 <script src=
"scripts/color-scheme.js?v=${CACHEID}"></script>
15 window
.addEventListener("DOMContentLoaded", () => {
16 window
.addEventListener("keydown", (event
) => {
19 event
.preventDefault();
20 window
.parent
.qBittorrent
.Client
.closeFrameWindow(window
);
25 const hash
= new URI().getData("hash");
31 $("addPeersOk").addEventListener("click", (e
) => {
35 const peers
= $("peers").value
.trim().split(/[\r\n]+/);
36 if (peers
.length
=== 0)
39 fetch("api/v2/torrents/addPeers", {
41 body
: new URLSearchParams({
43 "peers": peers
.join("|")
48 alert("QBT_TR(Unable to add peers. Please ensure you are adhering to the IP:port format.)QBT_TR[CONTEXT=HttpServer]");
52 window
.parent
.qBittorrent
.Client
.closeFrameWindow(window
);
60 <div style=
"padding: 10px 10px 0px 10px;">
61 <label for=
"peers">QBT_TR(List of peers to add (one IP per line):)QBT_TR[CONTEXT=PeersAdditionDialog]
</label>
62 <textarea id=
"peers" rows=
"10" style=
"width: 100%;" placeholder=
"QBT_TR(Format: IPv4:port / [IPv6]:port)QBT_TR[CONTEXT=PeersAdditionDialog]"></textarea>
63 <div style=
"margin-top: 10px; text-align: center;">
64 <button type=
"button" onclick=
"parent.qBittorrent.Client.closeFrameWindow(window);">QBT_TR(Cancel)QBT_TR[CONTEXT=PeersAdditionDialog]
</button>
65 <button type=
"button" id=
"addPeersOk">QBT_TR(Ok)QBT_TR[CONTEXT=PeersAdditionDialog]
</button>