-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
350 lines (305 loc) · 10.1 KB
/
Copy pathoptions.html
File metadata and controls
350 lines (305 loc) · 10.1 KB
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>qBittorrent Settings</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
max-width: 700px;
margin: 40px auto;
padding: 20px;
background-color: #f5f5f5;
}
.container {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
h1 {
color: #333;
margin-top: 0;
border-bottom: 2px solid #4CAF50;
padding-bottom: 10px;
font-size: 20px;
}
h2 {
font-size: 16px;
color: #333;
margin: 30px 0 15px 0;
padding-top: 20px;
border-top: 2px solid #eee;
}
.form-group {
margin-bottom: 20px;
}
label {
display: block;
margin-bottom: 5px;
color: #555;
font-weight: 500;
}
input[type="text"],
input[type="password"],
input[type="url"] {
width: 100%;
padding: 10px;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
font-size: 14px;
}
input:focus {
outline: none;
border-color: #4CAF50;
}
.button-group {
display: flex;
gap: 10px;
margin-top: 25px;
}
button {
padding: 12px 24px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: background-color 0.2s;
}
.save-btn {
background-color: #4CAF50;
color: white;
flex: 1;
}
.save-btn:hover {
background-color: #45a049;
}
.test-btn {
background-color: #2196F3;
color: white;
flex: 1;
}
.test-btn:hover {
background-color: #0b7dda;
}
.add-btn {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
margin-top: 15px;
}
.add-btn:hover {
background-color: #45a049;
}
.status {
margin-top: 15px;
padding: 12px;
border-radius: 4px;
display: none;
}
.status.success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
display: block;
}
.status.error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
display: block;
}
.help-text {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.example {
font-style: italic;
color: #888;
}
.site-item {
background: #f9f9f9;
padding: 15px;
border-radius: 6px;
margin-bottom: 10px;
border: 1px solid #e0e0e0;
}
.site-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.site-domain {
font-weight: 600;
color: #333;
font-size: 14px;
}
.delete-site-btn {
background-color: #f44336;
color: white;
padding: 6px 12px;
font-size: 12px;
}
.delete-site-btn:hover {
background-color: #da190b;
}
.site-details {
font-size: 12px;
color: #666;
}
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.modal-content {
background-color: white;
margin: 10% auto;
padding: 30px;
border-radius: 8px;
width: 90%;
max-width: 500px;
box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.modal h3 {
margin-top: 0;
color: #333;
}
.modal-buttons {
display: flex;
gap: 10px;
margin-top: 20px;
}
.cancel-btn {
background-color: #999;
color: white;
flex: 1;
}
.cancel-btn:hover {
background-color: #777;
}
#donateBtn:hover {
transform: scale(1.05);
}
</style>
</head>
<body>
<div class="container">
<h1>⚙️ qBittorrent Settings</h1>
<form id="settingsForm">
<div class="form-group">
<label for="qbUrl">qBittorrent Web UI URL</label>
<input type="url" id="qbUrl" placeholder="http://localhost:8080" required>
<div class="help-text">
<span class="example">Example: http://192.168.1.100:8084 or http://localhost:8084</span>
</div>
</div>
<div class="form-group">
<label for="qbUsername">Username</label>
<input type="text" id="qbUsername" placeholder="admin" required>
<div class="help-text">Your qBittorrent Web UI username</div>
</div>
<div class="form-group">
<label for="qbPassword">Password</label>
<input type="password" id="qbPassword" placeholder="Enter password" required>
<div class="help-text">Your qBittorrent Web UI password</div>
</div>
<div class="button-group">
<button type="submit" class="save-btn">💾 Save Settings</button>
<button type="button" id="testBtn" class="test-btn">🔌 Test Connection</button>
</div>
<div id="status" class="status"></div>
</form>
<h2>🔐 Torrent Site Credentials</h2>
<p style="font-size: 13px; color: #666; margin-bottom: 15px;">
Add credentials for private torrent sites that require login. The extension will automatically log in when downloading torrents from these sites.
</p>
<div id="sitesList"></div>
<button type="button" id="addSiteBtn" class="add-btn">
➕ Add Torrent Site
</button>
<div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #eee;">
<h3 style="color: #666; font-size: 14px;">Setup Instructions:</h3>
<ol style="color: #666; font-size: 13px; line-height: 1.8;">
<li>Configure qBittorrent settings above</li>
<li>Add your private torrent site credentials below</li>
<li>Right-click any torrent link and select "Send to qBittorrent"</li>
<li>The extension will handle login automatically!</li>
</ol>
</div>
<div style="margin-top: 30px; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 8px; text-align: center;">
<h3 style="color: white; margin: 0 0 10px 0; font-size: 16px;">☕ Enjoying this extension?</h3>
<p style="color: rgba(255,255,255,0.9); margin: 0 0 15px 0; font-size: 13px;">
Buy me a coffee to support development!
</p>
<a href="https://paypal.me/HackitZ"
target="_blank"
id="donateBtn"
style="display: inline-block; background: #FFC439; color: #003087; padding: 12px 30px; border-radius: 25px; text-decoration: none; font-weight: 600; font-size: 14px; transition: transform 0.2s;">
💝 Donate via PayPal (@HackitZ)
</a>
<div style="margin-top: 15px;">
<p style="color: rgba(255,255,255,0.9); margin: 0 0 10px 0; font-size: 12px;">Or scan the QR code:</p>
<img src="paypal-qr.jpg" alt="PayPal QR Code" style="width: 150px; height: 150px; border-radius: 8px; background: white; padding: 10px;">
</div>
<p style="color: rgba(255,255,255,0.8); margin: 15px 0 0 0; font-size: 11px;">
Your support helps keep this extension free and maintained!
</p>
</div>
</div>
<!-- Add Site Modal -->
<div id="addSiteModal" class="modal">
<div class="modal-content">
<h3>Add Torrent Site</h3>
<div class="form-group">
<label for="siteDomain">Site Domain</label>
<input type="text" id="siteDomain" placeholder="example.com">
<div class="help-text">Enter just the domain (e.g., iptorrents.com, torrentleech.org)</div>
</div>
<div class="form-group">
<label for="siteUsername">Username (optional if using cookies)</label>
<input type="text" id="siteUsername" placeholder="Your username">
</div>
<div class="form-group">
<label for="sitePassword">Password (optional if using cookies)</label>
<input type="password" id="sitePassword" placeholder="Your password">
</div>
<div class="form-group">
<label for="siteCookies">Cookies (recommended - fastest option)</label>
<textarea id="siteCookies" placeholder="Paste your cookies here (see instructions below)" style="width: 100%; height: 80px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-family: monospace; font-size: 12px; box-sizing: border-box;"></textarea>
<div class="help-text">
<strong>How to get cookies:</strong><br>
1. Log in to the torrent site in your browser<br>
2. Press F12 → "Application" tab → "Cookies" → Select your site<br>
3. Look for authentication cookies - <strong>different sites use different cookies:</strong><br>
<span style="margin-left: 20px;">• <strong>Most sites:</strong> <code>uid=12345; pass=abcdef123456</code></span><br>
<span style="margin-left: 20px;">• <strong>Cloudflare-protected sites (like IPTorrents):</strong> <code>cf_clearance=longvalue123</code></span><br>
<span style="margin-left: 20px;">• <strong>Some sites need both:</strong> <code>uid=12345; pass=abc; cf_clearance=xyz</code></span><br>
4. Copy the cookie values and format as: <code>name1=value1; name2=value2</code><br>
<strong>💡 Tip:</strong> If one set doesn't work, try copying ALL cookies from the site!<br>
<strong>⚠️ If you use cookies, you don't need username/password!</strong>
</div>
</div>
<div class="form-group">
<label for="loginUrl">Login URL (optional)</label>
<input type="url" id="loginUrl" placeholder="https://example.com/login.php">
<div class="help-text">Only needed if using username/password login</div>
</div>
<div class="modal-buttons">
<button type="button" id="saveSiteBtn" class="save-btn">Save</button>
<button type="button" id="cancelSiteBtn" class="cancel-btn">Cancel</button>
</div>
</div>
</div>
<script src="options.js"></script>
</body>
</html>