forked from bogenpirat/remote-torrent-adder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
184 lines (175 loc) · 11.2 KB
/
options.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Options for Remote Torrent Adder</title>
<script type="text/javascript" src="miscapis/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="miscapis/jquery-ui-1.10.3.custom.min.js"></script>
<script type="text/javascript" src="miscapis/RTAinit.js"></script>
<script type="text/javascript" src="miscapis/browser.js"></script>
<script type="text/javascript" src="miscapis/functions.js"></script>
<script type="text/javascript" src="miscapis/config.js"></script>
<script type="text/javascript" src="miscapis/options.js"></script>
<link rel="stylesheet" type="text/css" href="themes/south-street/jquery-ui-1.10.3.custom.min.css" />
<link rel="stylesheet" type="text/css" href="options.css" />
</head>
<body id="rta">
<h1><img src="icons/BitTorrent48.png" alt="BitTorrent!" /> Remote Torrent Adder Options</h1>
<div id="dialog" title="Add a server">
<form id="addserverform">
<fieldset class="ui-helper-reset">
<label for="tab_title">Server name:</label>
<input type="text" name="tab_title" id="tab_title" class="ui-widget-content ui-corner-all">
<label for="tab_client">Server type</label>
<select id="tab_client">
<option>Buffalo WebUI (OLD!)</option>
<option>Deluge WebUI</option>
<option>pyrt WebUI</option>
<option>qBittorrent WebUI</option>
<option>qBittorrent v4.1+ WebUI</option>
<option>ruTorrent WebUI</option>
<option>Torrentflux WebUI</option>
<option>Transmission WebUI</option>
<option>uTorrent WebUI</option>
<option>Vuze SwingUI</option>
<option>Vuze HTML WebUI</option>
<option>Bigly/Vuze Remote WebUI</option>
<option>Tixati WebUI</option>
<option>Hadouken WebUI</option>
<option>NodeJS-rTorrent WebUI</option>
<option>Synology WebUI</option>
<option>flood WebUI</option>
<option>flood-jesec WebUI</option>
<option>QNAP DownloadStation</option>
<option>tTorrent WebUI</option>
<option>rTorrent XML-RPC</option>
<option>Elementum WebUI</option>
</select>
</fieldset>
</form>
</div>
<div id="configtabs">
<ul>
<li><a href="#tabs-1">WebUI</a></li>
<li><a href="#tabs-2">Notifications</a></li>
<li><a href="#tabs-3">Link Catching</a></li>
<li><a href="#tabs-4">Import/Export Settings</a></li>
<li><a href="#tabs-5">About/Support</a></li>
</ul>
<div id="tabs-1">
<div id="serverstabs">
The leftmost server will be used as the <i>default</i> server for left-clicks, etc.
Drag 'n drop to rearrange them.
You can change the name after clicking on them.<br/>
<br/>
<button id="add_tab">Add Server</button>
<br/><br/>
<ul>
</ul>
</div>
</div>
<div id="tabs-2"><table>
<tr>
<td><span class="title"><label for="linksfoundindicator">Address bar indicator</label></span></td>
<td><input type="checkbox" id="linksfoundindicator" /><br />
<span class="tip">Enabling this will cause an indicator icon to appear in every page's address bar where the extension found torrent links matching the filters defined in "Link Catching"</span></td>
</tr>
<tr>
<td><span class="title"><label for="showpopups">Popups</label></span></td>
<td><input type="checkbox" id="showpopups" /><br />
<span class="tip">Enable this to view success/error messages as desktop notification popups</span></td>
</tr>
<tr>
<td><span class="title"><label for="hearpopups">Audible Notifications</label></span></td>
<td><input type="checkbox" id="hearpopups" /><br />
<span class="tip">Enable this to hear a sound when notifications appear</span></td>
</tr>
<tr>
<td><span class="title"><label for="popupduration">Popup Duration</label></span></td>
<td><input type="text" id="popupduration" /> msec<br />
<span class="tip">Duration of time until the popups are removed</span></td>
</tr>
<tr>
<td><span class="title"><label for="notificationtest">Test it</label></span></td>
<td><button id="notificationtest" >hit me</button></td>
</tr>
</table></div>
<div id="tabs-3"><table>
<tr>
<td><span class="title"><label for="catchfromcontextmenu">Context menu</label></span></td>
<td><input type="checkbox" id="catchfromcontextmenu" /><br />
<span class="tip">Enable this to add a context menu entry for links. You must restart for this setting to take effect.</span></td>
</tr>
<tr>
<td><span class="title"><label for="catchfrompage">Clicks on links</label></span></td>
<td><input type="checkbox" id="catchfrompage" /><br />
<span class="tip">Enable this to intercept links from pages where torrent links were found and automatically send them to the WebUI instead of downloading them locally (can be overridden by holding CTRL/ALT/SHIFT).</span><br />
<div style="float:left;"><select id="linkmatches"></select></div>
<div style="position:relative; float:left;"><button id="addfilterbtn">+</button><br />
<button id="delfilterbtn">-</button><br /><button id="showfiltersbtn">~</button></div><br style="clear:both;" />
<span class="tip">Creating new filters is easy; just look at a sample link that you want matched, remove parts of it as long as it still resembles a link scheme specific to your torrent site, then follow these rules:<br />
- escape (put a backslash in front of) every: ".", "/", "?"<br/>
- replace dynamic parts: ("\d+" matches any number, e.g. torrent ID, ".+?" matches any character, "[:alpha:]" matches any string containing letters or numbers)<br />
<a target="_blank" href="http://www.regular-expressions.info/reference.html">more detailed information</a></span>
</td>
</tr>
<tr>
<td><span class="title"><label for="catchfromnewtab">New tab</label></span></td>
<td><input type="checkbox" id="catchfromnewtab" /><br />
<span class="tip">Enable this to have RTA grab links from newly opened tabs.</span></td>
</tr>
<tr>
<td><span class="title"><label for="registerDelay">Scan delay</label></span></td>
<td><input type="text" id="registerDelay" />ms<br />
<span class="tip">This will delay RTA's link scanning after the page loads. Useful for pages that generate torrent links dynamically.</span></td>
</tr>
</table></div>
<div id="tabs-4"><table>
<tr>
<td><span class="title">Create a backup</span></td>
<td><button id="createBackupButton">Export settings</button></td>
</tr>
<tr>
<td><span class="title">Import a backup</span></td>
<td><input id="importBackupSelector" type="file" /><br/><div id="importResultField"></div></td>
</tr>
</table></div>
<div id="tabs-5"><table>
<tr>
<td><span class="title">About the extension</span></td>
<td>This extension lets you silently add torrent files to a BitTorrent client's web interface, either running on a remote server, or on your local computer. It lets you manually add torrents from a link's context menu, or can automatically find links that have torrents in them, using configurable regular expression filters, so that you only have to click on such a link to automatically load it into the configured client.</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td><span class="title">Info/FAQ/Changelog</span></td>
<td>Most non-bug related questions that arise in regard to this extension are about links that don't get caught. This extension finds these links through the use of regular expressions. A basic description on how to configure your own filters among other information can be found via this link:<br/>
<a target="_blank" href="https://github.com/bogenpirat/remote-torrent-adder/">https://github.com/bogenpirat/remote-torrent-adder/</a></td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td><span class="title">Problems/Bugs</span></td>
<td>If you find a bug, or have a feature request, please create an issue ticket on the project's GitHub issue tracker. This is the best route of reaching me:<br/>
<a target="_blank" href="https://github.com/bogenpirat/remote-torrent-adder/issues">Remote Torrent Adder GitHub Issue Tracker</a><br/><br/>
For bugs, please supply the Google Chrome version you're using as well as a description of your behavior, the extension's misbehavior, what you were expecting to happen.<br/>
For new web interface support requests, please supply a link to the client's web site or its web interface documentation (or an alternative open source remote adding implementation).</td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td><span class="title">Source code</span></td>
<td>The Git repository for this project will always contain the latest version of the source code of this extension. Feel free to clone it and send in pull requests if you think they're worth incorporating.<br/>
<a target="_blank" href="https://github.com/bogenpirat/remote-torrent-adder">Remote Torrent Adder GitHub project</a></td>
</tr>
<tr><td colspan="2"> </td></tr>
<tr>
<td><span class="title">Mission Statement</span></td>
<td>This extension to the Google Chrome web browser was created to facilitate the easy (and possibly silent) adding of torrent files to BitTorrent clients' web interfaces. This improves on two minor downsides of the Google Chrome web browser as compared to the much more configurable and extensible Firefox web browser:<br/><br/>
At the time of the conception of this extension,
<ol>
<li>... Google Chrome did not have the ability to automatically open downloaded files based on their file type. Thus, the act of adding a torrent file to a local BitTorrent client required additional, superfluous clicks. This extension reduces the amount of clicks to just the one click on the original web link.</li>
<li>... there was no Google Chrome extension performing the task that <a target="_blank" href="http://www.alexisbrunet.com/">Alexis Brunet</a>'s BitTorrent WebUI Firefox Extension does. Its functionality, again easing the life of people who operate BitTorrent clients that are on remote servers, is done by removing unnecessary clicks from the process. The tedious sequence of downloading a torrent file, opening up the remote web interface, searching for and uploading the file is reduced to, again, one single click.</li>
</ol>
From a developer's standpoint, this extension has been written to be more or less plug and play. Support for each web interface is encapsulated in javascript functions, message passing between a content script that tracks torrent-links and the background script that does all the hard work facilitates all of the main functionality. Barely anything is commented, and there is next to no object orientation going on in the source code, so it's not the prettiest code. But since this started out mostly as a proof of concept to myself and most parts of it are either pretty self-explanatory, or hacked together using some rather new javascript methodologies (e.g. typed arrays), i don't see a reason to change that in the near future.
</td>
</tr>
</table></div>
</div>
</body>
</html>