Display External IP Address in status bar
[qBittorrent.git] / src / webui / www / private / addwebseeds.html
blobf266ecaba16b90a84574aeb67313eeb8fde366c9
1 <!DOCTYPE html>
2 <html lang="${LANG}">
4 <head>
5 <meta charset="UTF-8">
6 <title>QBT_TR(Add web seeds)QBT_TR[CONTEXT=HttpServer]</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>
11 "use strict";
13 window.addEventListener("DOMContentLoaded", () => {
14 new Keyboard({
15 defaultEventType: "keydown",
16 events: {
17 "Escape": function(event) {
18 window.parent.qBittorrent.Client.closeWindows();
19 event.preventDefault();
21 "Esc": function(event) {
22 window.parent.qBittorrent.Client.closeWindows();
23 event.preventDefault();
26 }).activate();
28 $("urls").focus();
29 $("addWebSeedsButton").addEvent("click", (e) => {
30 e.stopPropagation();
31 const hash = new URI().getData("hash");
32 new Request({
33 url: "api/v2/torrents/addWebSeeds",
34 method: "post",
35 data: {
36 hash: hash,
37 urls: $("urls").value.split("\n").map(w => encodeURIComponent(w.trim())).filter(w => (w.length > 0)).join("|")
39 onComplete: () => {
40 window.parent.qBittorrent.Client.closeWindows();
42 }).send();
43 });
44 });
45 </script>
46 </head>
48 <body>
49 <div style="text-align: center;">
50 <br>
51 <label for="urls">QBT_TR(List of web seeds to add (one per line):)QBT_TR[CONTEXT=HttpServer]</label>
52 <textarea name="list" id="urls" rows="10" cols="1"></textarea>
53 <br>
54 <input type="button" value="QBT_TR(Add)QBT_TR[CONTEXT=HttpServer]" id="addWebSeedsButton">
55 </div>
56 </body>
58 </html>