qbittorrent-webui-cjratliff.../private/addtrackers.html
2023-06-18 23:32:21 -03:00

60 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="${LANG}">
<head>
<meta charset="UTF-8" />
<title>Add trackers</title>
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/Core.css?v=${CACHEID}" />
<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.addEvent('domready', function() {
new Keyboard({
defaultEventType: 'keydown',
events: {
'Escape': function(event) {
window.parent.closeWindows();
event.preventDefault();
},
'Esc': function(event) {
window.parent.closeWindows();
event.preventDefault();
}
}
}).activate();
$('trackersUrls').focus();
$('addTrackersButton').addEvent('click', function(e) {
new Event(e).stop();
const hash = new URI().getData('hash');
new Request({
url: 'api/v2/torrents/addTrackers',
method: 'post',
data: {
hash: hash,
urls: $('trackersUrls').value
},
onComplete: function() {
window.parent.closeWindows();
}
}).send();
});
});
</script>
</head>
<body>
<div style="text-align: center;">
<br />
<h2 class="vcenter">List of trackers to add (one per line):</h2>
<textarea name="list" id="trackersUrls" rows="10" cols="1"></textarea>
<br />
<input class="button" type="button" value="Add" id="addTrackersButton" />
</div>
</body>
</html>