-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathquiCKIE.user.js
More file actions
5334 lines (4090 loc) · 257 KB
/
Copy pathquiCKIE.user.js
File metadata and controls
5334 lines (4090 loc) · 257 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
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ==UserScript==
// ----------------------------------- MetaData --------------------------------------
// @name qui - quiCKIE
// @author WirlyWirly + Contributors 🫶
// @version 1.48
// @homepage https://github.com/WirlyWirly/quiCKIE
// @description A UserScript to quickly send torrents from a tracker to a client, with customizable per-site settings and presets 🐰
// Orignally written for qui, later extended to support more torrent clients
// Written on LibreWolf via Violentmonkey
// @namespace https://github.com/WirlyWirly
// @icon https://raw.githubusercontent.com/WirlyWirly/quiCKIE/main/icon.webp?raw=true
// @run-at document-end
// ----------------------------------- Matches --------------------------------------
// Adding a New Tracker: https://github.com/WirlyWirly/quiCKIE/wiki/Adding-a-New-Tracker
// @match https://aither.cc/
// @match https://aither.cc/*/bookmarks*
// @match https://aither.cc/playlists/*
// @match https://aither.cc/torrents*
// @match https://alpharatio.cc/top10.php*
// @match https://alpharatio.cc/torrents.php*
// @match https://animebytes.tv/alltorrents.php?*&userid=*
// @match https://animebytes.tv/artist.php?id=*
// @match https://animebytes.tv/bookmarks.php*
// @match https://animebytes.tv/collage.php?*id=*
// @match https://animebytes.tv/company.php?id=*
// @match https://animebytes.tv/series.php?id=*
// @match https://animebytes.tv/torrents*
// @match https://animez.to/
// @match https://animez.to/torrents*
// @match https://animez.to/torrent-bookmarks*
// @match https://anthelion.me/torrents.php*
// @match https://avistaz.to/
// @match https://avistaz.to/*/bookmark*
// @match https://avistaz.to/torrent*
// @match https://bakabt.me/torrent/*
// @match https://beyond-hd.me/
// @match https://beyond-hd.me/bookmarks*
// @match https://beyond-hd.me/download/*
// @match https://beyond-hd.me/library*
// @match https://beyond-hd.me/torrents*
// @match https://beyond-hd.me/torrents/seed*
// @match https://beyond-hd.me/watchlist*
// @match https://bibliotik.me/collections/*
// @match https://bibliotik.me/notifications/torrents*
// @match https://bibliotik.me/torrents/*
// @match https://bibliotik.me/users/*/leeching*
// @match https://bibliotik.me/users/*/seeding*
// @match https://bibliotik.me/users/*/snatches*
// @match https://bibliotik.me/users/*/uploads*
// @match https://bitporn.eu/
// @match https://bitporn.eu/*/bookmarks*
// @match https://bitporn.eu/playlists/*
// @match https://bitporn.eu/torrents*
// @match https://broadcasthe.net/collages.php?id=*
// @match https://broadcasthe.net/series.php?id=*
// @match https://broadcasthe.net/torrents.php*
// @match https://cinemaz.to/
// @match https://cinemaz.to/*/bookmark*
// @match https://cinemaz.to/torrent/*
// @match https://clearjav.com/
// @match https://clearjav.com/*/bookmarks*
// @match https://clearjav.com/movies/*
// @match https://clearjav.com/playlists/*
// @match https://clearjav.com/torrents*
// @match https://www.deepbassnine.com/artist.php?id=*
// @match https://www.deepbassnine.com/collages.php?id=*
// @match https://www.deepbassnine.com/torrents.php*
// @match https://digitalcore.club/
// @match https://digitalcore.club/alltorrents*
// @match https://digitalcore.club/apps*
// @match https://digitalcore.club/bookmarks*
// @match https://digitalcore.club/games*
// @match https://digitalcore.club/movies*
// @match https://digitalcore.club/music*
// @match https://digitalcore.club/other*
// @match https://digitalcore.club/torrent-lists/*
// @match https://digitalcore.club/torrent/*
// @match https://digitalcore.club/tvseries*
// @match https://digitalcore.club/xxx*
// @include /^https://(www\.empornium|emparadise)\.(sx|rs)/collage/\d.*/
// @include /^https://(www\.empornium|emparadise)\.(sx|rs)/top10\.php.*/
// @include /^https://(www\.empornium|emparadise)\.(sx|rs)/torrents\.php.*/
// @include /^https://(www\.empornium|emparadise)\.(sx|rs)/user\.php\?id=\d+/
// @match https://e*hentai.org/gallerytorrents.php*
// @match https://exoticaz.to/
// @match https://exoticaz.to/*/bookmark*
// @match https://exoticaz.to/torrent*
// @match https://femdomcult.org/collage/*
// @match https://femdomcult.org/torrents.php*
// @match https://gazellegames.net/collections.php?id=*
// @match https://gazellegames.net/torrents.php*
// @match https://gazellegames.net/bookmarks.php*
// @match https://www.happyfappy.net/collage/*
// @match https://www.happyfappy.net/top10.php*
// @match https://www.happyfappy.net/torrents.php*
// @match https://www.happyfappy.net/user.php?id=*
// @match https://hdbits.org/bookmarks*
// @match https://hdbits.org/browse.php*
// @match https://hdbits.org/details.php?id=*
// @match https://hdbits.org/film/info?id=*
// @include /^https://iptorrents\.\w+/details.php?id=.*/
// @include /^https://iptorrents\.\w+/t.*/
// @include /^https://iptorrents\.\w+/torrent.php?id=.*/
// @match https://itatorrents.xyz/
// @match https://itatorrents.xyz/torrents*
// @match https://jpopsuki.eu/artist.php?id=*
// @match https://jpopsuki.eu/collages.php?id=*
// @match https://jpopsuki.eu/top10.php*
// @match https://jpopsuki.eu/torrents.php*
// @match https://karagarga.in/details.php*
// @match https://karagarga.in/browse.php*
// @match https://kufirc.com/bookmarks.php*
// @match https://kufirc.com/collages.php*
// @match https://kufirc.com/top10.php*
// @match https://kufirc.com/torrents.php*
// @match https://lat-team.com/
// @match https://lat-team.com/*/bookmarks
// @match https://lat-team.com/playlists/*
// @match https://lat-team.com/torrents*
// @match https://lst.gg/
// @match https://lst.gg/*/bookmarks*
// @match https://lst.gg/playlists/*
// @match https://lst.gg/torrents*
// @match https://luminarr.me/
// @match https://luminarr.me/*/bookmarks
// @match https://luminarr.me/playlists/*
// @match https://luminarr.me/torrents*
// @match https://materialize.is/collages.php?id=*
// @match https://materialize.is/top10.php*
// @match https://materialize.is/torrents.php*
// @match https://mircrew-releases.org/*
// @match https://www.morethantv.me/collage/*
// @match https://www.morethantv.me/top10.php*
// @match https://www.morethantv.me/torrents/browse*
// @match https://www.myanonamouse.net/
// @match https://www.myanonamouse.net/stats/top10Tor.php*
// @match https://www.myanonamouse.net/t/*
// @match https://www.myanonamouse.net/tor/browse.php*
// @match https://www.myanonamouse.net/tor/search.php*
// @match https://nebulance.io/bookmarks.php*
// @match https://nebulance.io/top10.php*
// @match https://nebulance.io/torrents.php*
// @match https://nebulance.io/details.php*
// @include /^https://(sukebei\.)?nyaa\.\w+/.*/
// @include /^https://(sukebei\.)?nyaa\.\w+/view/.*/
// @match https://oldtoons.world/
// @match https://oldtoons.world/*/bookmarks
// @match https://oldtoons.world/playlists/*
// @match https://oldtoons.world/torrents*
// @match https://orpheus.network/artist.php?id=*
// @match https://orpheus.network/bookmarks.php*
// @match https://orpheus.network/collages.php?id=*
// @match https://orpheus.network/top10.php*
// @match https://orpheus.network/torrents.php*
// @match https://passthepopcorn.me/torrents.php?id=*
// @match https://portugas.org/
// @match https://portugas.org/*/bookmarks
// @match https://portugas.org/playlists/*
// @match https://portugas.org/torrents*
// @match https://privatehd.to/
// @match https://privatehd.to/torrent*
// @match https://privatehd.to/*/bookmark*
// @match https://redacted.sh/artist.php?id=*
// @match https://redacted.sh/bookmarks.php*
// @match https://redacted.sh/collage*.php?id=*
// @match https://redacted.sh/top10.php*
// @match https://redacted.sh/torrents.php*
// @match https://redacted.sh/userhistory.php?action=subscribed_collages
// @match https://retro-movies.club/
// @match https://retro-movies.club/*/bookmarks
// @match https://retro-movies.club/playlists/*
// @match https://retro-movies.club/torrents*
// @match https://secret-cinema.pw/artist.php?id=*
// @match https://secret-cinema.pw/collages.php?id=*
// @match https://secret-cinema.pw/top10.php*
// @match https://secret-cinema.pw/torrents.php*
// @match https://sportscult.org/index.php?page=torrents*
// @match https://sportscult.org/index.php?page=torrent-details*
// @match https://thegeeks.click/browse.php*
// @match https://thegeeks.click/details.php?id=*
// @match https://www.torrentleech.org/torrent*
// @match https://tv-vault.me/torrents.php?id=*
// ----------------------------------- Permissions --------------------------------------
// @grant GM_addStyle
// @grant GM_getResourceText
// @grant GM_getValue
// @grant GM_listValues
// @grant GM_registerMenuCommand
// @grant GM_setValue
// @grant GM_xmlhttpRequest
// ----------------------------------- Dependencies --------------------------------------
// @resource settingsPanelCSS https://raw.githubusercontent.com/WirlyWirly/quiCKIE/main/quiCKIE.css?raw=true
// @resource presetsMenuCSS https://raw.githubusercontent.com/WirlyWirly/quiCKIE/main/contextMenu.css?raw=true
// @require https://raw.githubusercontent.com/WirlyWirly/quiCKIE/main/contextMenu.js?raw=true
// @require https://raw.githubusercontent.com/WirlyWirly/UserScripts/main/HelperScripts/simpleLogger.js
// @require https://cdn.jsdelivr.net/gh/sizzlemctwizzle/GM_config@43fd0fe4de1166f343883511e53546e87840aeaf/gm_config.js
// ----------------------------------- Development --------------------------------------
// localhost urls used during development. Easily served over http by MiniServe: https://github.com/svenstaro/miniserve
// resource settingsPanelCSS http://localhost:12345/quiCKIE.css
// resource presetsMenuCSS http://localhost:12345/ContextMenu.css
// require http://localhost:12345/ContextMenu.js
// ----------------------------------- Script Links --------------------------------------
// @updateURL https://raw.githubusercontent.com/WirlyWirly/quiCKIE/main/quiCKIE.user.js?raw=true
// @downloadURL https://raw.githubusercontent.com/WirlyWirly/quiCKIE/main/quiCKIE.user.js?raw=true
//
// ==/UserScript==
// Set to true to enable verbose console logging, useful during development or troubleshooting
const verboseConsoleLogging = false
// This string helps prevent various JavaScript oddities when working with variables
'use strict'
// =================================== SETTINGS PANEL TRACKERS ======================================
// @quickieSettingsPanelTrackers
const settingsPanelTrackers = [
// Keep this list alphabetical, as each tracker here will appear as a row in the quiCKIE settings panel
// Each tracker requires 3 things; A TitleCase name, the homepage URL, and the primaryDomain of the tracker
// Here are examples of identify the domain of a tracker...
// https://broadcasthe.net/ --> broadcasthe
// https://www.myanonamouse.net/ --> myanonamouse
// https://sukebei.nyaa.si/ --> nyaa
// ℹ️ If the tracker has more than one domain that it can be accessed from (common for public trackers), you may also include the 'otherDomains' property, which should consist of an array (list) of different domains. This will make it so that these domains all share the same tracker settings from within the quiCKIE settings panel.
// otherDomains: ['domain1', 'domain2', 'domain3'],
{
trackerName: 'Aither', // @holy-elbow
homepageURL: 'https://aither.cc',
primaryDomain: 'aither',
},
{
trackerName: 'AlphaRatio',
homepageURL: 'https://alpharatio.cc',
primaryDomain: 'alpharatio',
},
{
trackerName: 'AnimeBytes',
homepageURL: 'https://animebytes.tv',
primaryDomain: 'animebytes',
},
{
trackerName: 'AnimeZ', // @holy-elbow
homepageURL: 'https://animez.to',
primaryDomain: 'animez',
},
{
trackerName: 'Anthelion', // @malefis
homepageURL: 'https://anthelion.me',
primaryDomain: 'anthelion',
},
{
trackerName: 'AvistaZ', // @fercats99
homepageURL: 'https://avistaz.to',
primaryDomain: 'avistaz',
},
{
trackerName: 'BakaBT',
homepageURL: 'https://bakabt.me',
primaryDomain: 'bakabt',
},
{
trackerName: 'Beyond-HD', // @empUser
homepageURL: 'https://beyond-hd.me',
primaryDomain: 'beyond-hd',
},
{
trackerName: 'Bibliotik',
homepageURL: 'https://bibliotik.me',
primaryDomain: 'bibliotik',
},
{
trackerName: 'BitPorn',
homepageURL: 'https://bitporn.eu',
primaryDomain: 'bitporn',
},
{
trackerName: 'BroadcasTheNet',
homepageURL: 'https://broadcasthe.net',
primaryDomain: 'broadcasthe',
},
{
trackerName: 'CinemaZ', // @fercats99
homepageURL: 'https://cinemaz.to',
primaryDomain: 'cinemaz',
},
{
trackerName: 'ClearJAV', // @holy-elbow
homepageURL: 'https://clearjav.com',
primaryDomain: 'clearjav',
},
{
trackerName: 'DeepBassNine', // @tartuffe
homepageURL: 'https://www.deepbassnine.com',
primaryDomain: 'deepbassnine',
},
{
trackerName: 'DigitalCore', // @holy-elbow
homepageURL: 'https://digitalcore.club/',
primaryDomain: 'digitalcore',
},
{
trackerName: 'E-Hentai', // @holy-elbow
homepageURL: 'https://e-hentai.org',
primaryDomain: 'e-hentai',
otherDomains: ['exhentai'],
},
{
trackerName: 'Empornium',
homepageURL: 'https://emparadise.rs',
primaryDomain: 'empornium',
otherDomains: ['emparadise']
},
{
trackerName: 'ExoticaZ', // @fercats99 > @holy-elbow
homepageURL: 'https://exoticaz.to',
primaryDomain: 'exoticaz',
},
{
trackerName: 'Femdomcult', // @holy-elbow
homepageURL: 'https://femdomcult.org',
primaryDomain: 'femdomcult',
},
{
trackerName: 'GazelleGames',
homepageURL: 'https://gazellegames.net',
primaryDomain: 'gazellegames',
},
{
trackerName: 'HappyFappy', // @empUser
homepageURL: 'https://www.happyfappy.org',
primaryDomain: 'happyfappy',
},
{
trackerName: 'HDBits',
homepageURL: 'https://hdbits.org',
primaryDomain: 'hdbits',
},
{
trackerName: 'IP-Torrents',
homepageURL: 'https://iptorrents.me',
primaryDomain: 'iptorrents',
},
{
trackerName: 'ItaTorrents', // @steventrux
homepageURL: 'https://itatorrents.xyz',
primaryDomain: 'itatorrents',
},
{
trackerName: 'JPopsuki', // @tartuffe
homepageURL: 'https://jpopsuki.eu',
primaryDomain: 'jpopsuki',
},
{
trackerName: 'Karagarga', // @fercats99
homepageURL: 'https://karagarga.in',
primaryDomain: 'karagarga',
},
{
trackerName: 'Kufirc', // @holy-elbow
homepageURL: 'https://kufirc.com',
primaryDomain: 'kufirc',
},
{
trackerName: 'Lat-Team',
homepageURL: 'https://lat-team.com',
primaryDomain: 'lat-team',
},
{
trackerName: 'LST', // @LilithOfTheValley
homepageURL: 'https://lst.gg',
primaryDomain: 'lst',
},
{
trackerName: 'Luminarr', // @holy-elbow
homepageURL: 'https://lumniarr.me',
primaryDomain: 'luminarr',
},
{
trackerName: 'Materialize',
homepageURL: 'https://materialize.is',
primaryDomain: 'materialize',
},
{
trackerName: 'MirCrew', // @steventrux
homepageURL: 'https://mircrew-releases.org',
primaryDomain: 'mircrew-releases',
},
{
trackerName: 'MoreThanTV', // @holy-elbow
homepageURL: 'https://www.morethantv.me',
primaryDomain: 'morethantv',
},
{
trackerName: 'MyAnonaMouse',
homepageURL: 'https://www.myanonamouse.net',
primaryDomain: 'myanonamouse',
},
{
trackerName: 'Nebulance', // @malefis
homepageURL: 'https://nebulance.io',
primaryDomain: 'nebulance',
},
{
trackerName: 'Nyaa',
homepageURL: 'https://nyaa.si',
primaryDomain: 'nyaa',
},
{
trackerName: 'Oldtoons',
homepageURL: 'https://oldtoons.world',
primaryDomain: 'oldtoons',
},
{
trackerName: 'Orpheus',
homepageURL: 'https://orpheus.network',
primaryDomain: 'orpheus',
},
{
trackerName: 'PassThePopcorn',
homepageURL: 'https://passthepopcorn.me',
primaryDomain: 'passthepopcorn',
},
{
trackerName: 'Portugas', // @Phreaker
homepageURL: 'https://portugas.org',
primaryDomain: 'portugas',
},
{
trackerName: 'PrivateHD', // @holy-elbow
homepageURL: 'https://privatehd.to',
primaryDomain: 'privatehd',
},
{
trackerName: 'Redacted',
homepageURL: 'https://redacted.sh',
primaryDomain: 'redacted',
},
{
trackerName: 'RetroMoviesClub', // @LilithOfTheValley
homepageURL: 'https://retro-movies.club',
primaryDomain: 'retro-movies',
},
{
trackerName: 'Secret-Cinema', // @tartuffe
homepageURL: 'https://secret-cinema.pw',
primaryDomain: 'secret-cinema',
},
{
trackerName: 'SportsCult', // @steventrux
homepageURL: 'https://sportscult.org',
primaryDomain: 'sportscult',
},
{
trackerName: 'TheGeeks',
homepageURL: 'https://thegeeks.click',
primaryDomain: 'thegeeks',
},
{
trackerName: 'TorrentLeech', // @holy-elbow
homepageURL: 'https://www.torrentleech.org',
primaryDomain: 'torrentleech',
},
{
trackerName: 'TV-Vault',
homepageURL: 'https://tv-vault.me',
primaryDomain: 'tv-vault',
},
]
// =================================== quiCKIE SETTINGS ======================================
// The domain of the current site, which MUST be registerd to one of the trackers in the settingsPanelTrackers array
// Example: https://broadcasthe.net/ --> broadcasthe
let trackerDomain = document.location.hostname.match(/^(\w+\.)?(.+?)\..+$/)[2].toLowerCase()
// A simple logger, which will only console log messages when it has been enabled above
let logger = new simpleLogger({ enabled: verboseConsoleLogging, scriptName: 'quiCKIE'})
// Everything related to the GM_config library, which is used for saving and creating the settings panel: https://github.com/sizzlemctwizzle/GM_config
let [ primaryDomain, allPrimaryDomains, allTrackerNames, primaryDomainToTrackerName, primaryDomainToHomepage, trackerNameToPrimaryDomain, presetCount ] = createGMConfigSettingsPanel(trackerDomain)
// Retrieve the settings and presetMenuItems that are relevant to the current tracker
let SETTINGS = getTrackerSettings(primaryDomain)
let presetMenuItems = createPresetItems([SETTINGS.primaryDomain])
// All the emojis that may be displayed on bunnyButtons, defined as a RegExp so that they can be replaced during different stages of the script
const emojiRegex = new RegExp('🐰|🌱|🍁|📢|💎|💸|🤝|🌎|🧲|🧑|🕓|✔️|❌|💾|🧀', 'g')
// The full URL and Path of the current page, useful for figuring out exactly what page you are on using pageURL.match(/regex/)
const pageURL = document.URL
const pagePath = document.location.pathname
// =================================== TRACKER SPECIFIC HANDLING ======================================
// @trackerSpecificHandling
// Because the primaryDomain is unique for each quiCKIE supported tracker, we can use it to determine what tracker this is and how to proceed from there
if ( primaryDomain == 'animebytes' ) {
// ----------------------------------- AnimeBytes -----------------------------------
// Bookmarks | Browse | Collages | Company | Seeding\Snatched\Leeching | Series
let trackerHandlingOptions = {
// ------------------------- REQUIRED -------------------------
// A valid CSS selector that is unique to ONLY the download elements (download buttons) on the page
downloadElementsSelector: 'a[href^="/torrent/"][title="Download torrent"]',
// --------------------------OPTIONAL -------------------------
// The following properties are all optional and can be applied on a per-tracker basis or when appropriate to do so depending on the page of the tracker
// ℹ️ Tip: To apply options on a per-page basis, use an 'if' statement to determine the current page based on the pageURL. From there, you can apply the options relevant to that page (See the BroadCasTheNet\Empornium\IP-Torrents\MyAnonaMouse\Nyaa blocks for examples)
// - - - - - - - - - PRESENTATION - - - - - - - - -
// Options to assist with the visual presentation\styling of bunnyButtons
// The text that will be displayed by EVERY bunnyButton, useful for removing the surrounding whitespace included with the default setting, or when performing advanced styling
bunnyButtonText: ' 🐰 ', // Default = ' 🐰 ' || Options = Any string
// The font-size of EVERY bunnyButton, useful for re-sizing them to better fit the page
bunnyButtonfontSize: 'inherit', // Default = 'inherit' || Options = Any percentile | A valid 'font-size' css value
// Additional CSS style properties that will be applied to EVERY bunnyButton, useful for advanced styling (see the BakabT\HDBits\MyAnonaMouse\Nyaa blocks for examples)
bunnyButtonAddStyles: '', // Default = '' || Options = A string containing css style properties
// Additional class names that will be applied to EVERY bunnyButton, useful for advanced styling
bunnyButtonAddClasses: [], // Default = [] || Options = An array of strings
// If EVERY bunnyButton should be placed alongside its respective downloadElement.parentElement, which may result in the bunnyButton appearing on the same row as the downloadElement
bunnyButtonParentPlacement: false, // Default = false || Options = true | false
// If the downloadElement.parentElement should be hidden When '🙈 Hide Download Button' (settings panel) and the above 'bunnyButtonParentPlacement' option are both enabled. Some sites, but not all, will show a noticable gap when both those options are enabled, so this options exists to try preventing that gap.
downloadElementHideParentElementGap: false, // Default = false || Options = true | false
// The separator used between EVERY bunnyButton and the downloadElement
elementsSeparator: 'automatic', // Default = 'automatic' || options = 'automatic' | Any string | false
// A function that will be called after all the bunnyButtons have been created, useful for advanced styling when certain bunnyButtons on the page have individual styling needs (see the BakaBT\Empornium\MyAnonaMouse blocks for examples)
// The provided 'elements' parameter will be an object consisting of three arrays: elements = { bunnyButtons: [], downloadElements: [], pairedElements:[] }
// ⚠️ quiCKIE is a NON-DESTRUCTIVE UserScript that does NOT break or destroy the default site elements. This ensures quiCKIE is friendly\compatible with other UserScripts. Always adhere to this principle by only manipulating the bunnyButtons created by quiCKIE itself
afterBunnyButtonCreation: false, // Default = false || options = false | function(elements) {...}
// - - - - - - - - - EMOJIOGRAPHY - - - - - - - - -
// Options that allow you to add "Emojiography" support to a tracker by providing a string representing a JavaScript comparison. If that check completes successfully and is 'true', it indicates a torrent is seeding\snatched\freeleech and as a result will have its bunnyButton emoji updated to reflect this
// The string may start with 'downloadElement' (representing a DL button) then be followed by a chain of '.closest()' and\or '.querySelector()' methods in order to locate a 'targetElement' (which refers to a element in the HTML indicating the torrent has a certain status). If the targetElement is found, the check is considered to be 'true'
// See the AnimeBytes\BroadcasTheNet\Empornium\Orpheus\PassThePopcorn\Redacted blocks for examples
// ℹ️ Tip: If the targetElement has a unique .textContent but not attributes, one option is to perform a `targetElement.textContent.match(/regex/)`. If the regex match is found, the check is considered to be 'true' (see the MyAnonaMouse\Redacted block for examples)
// ℹ️ Tip: When inspecting the page from your browser, right-click the DL button HTML element and select the 'Use in Console' option. This will create a variable in your console that you can use to test your chaining. Once you have a working chain that to locate the target element, you can use it for these options.
// A string representing a JavaScript comparison, that if 'true' indicates a torrent has the status of 'seeding', so the bunnyButton emoji will be changed to '🌱'
seedingStatusSelector: null, // Default = null || Options = 'downloadElement...'
// A string representing a JavaScript comparison, that if 'true' indicates a torrent has the status of 'snatched', so the bunnyButton emoji will be changed to '🍁'
snatchedStatusSelector: `downloadElement.closest('td').querySelector('a.snatched-torrent')`, // Default = null || Options = 'downloadElement...'
// A string representing a JavaScript comparison, that if 'true' indicates a torrent has the status of 'freeleech', so the bunnyButton emoji will be changed to '💎'
freeleechStatusSelector: `downloadElement.closest('td').querySelector('img[alt^="Freeleech"]')`, // Default = null || Options = 'downloadElement...'
// A string representing a JavaScript comparison, that if 'true' indicates a torrent has the status of 'featured', so the bunnyButton emoji will be changed to '📢'
featuredStatusSelector: null, // Default = null || Options = 'downloadElement...'
// - - - - - - - - - PAGINATION - - - - - - - - -
// Options that can assist when the tracker has pagination, which is when the page does not perform a full refresh for new DL buttons, which results in those new DL buttons that are loaded into the page not having bunnyButtons
//⚠️ You should not enable or use these options unless the tracker you are adding actually has pagination, in which case the URL's with pagination should be filtered through an if check so as to not apply these options to the entire site: pageURL.match(/pageURLRegex/) ? trackerHandlingOptions.enablePaginationLooping = true : null
// If quiCKIE should repeatedly check for new download elements, which works as a simple approach for handling pagination
enablePaginationLooping: false, // Default = false || Options = true | false
// - - - - - - - - - OTHER - - - - - - - - -
// Options to perform a vareity of tasks that may or may not apply to certain trackers
// The element that will be used as the root when performing .querySelectorAll(downloadElementsSelector) to find all the downloadElements
queryFromElement: document, // Default = document || Options = document | A specific element (node)
// The name of the downloadElement attribute that contains the torrentURL
downloadElementsTorrentURLAttribute: 'href', // Default = 'href' || Options = A string matching a attribute name of the download element
// If quiCKIE should ALWAYS download the .torrent file through the browser before sending it to the torrent client, useful if the torrentURL authentication doesn't actually work
// Magnet links are ALWAYS sent directly to the torrent client, as they are not proper http links that can be downloaded through the browser
forceTorrentFile: false, // Default = false || Options = true | false
// If quiCKIE should attach the right-click presetsMenu to the new bunnyButtons, useful for advanced presetsMenu manipulation
bunnyButtonAttachPresetsMenu: true, // Default = true || Options = true | false
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'aither' ) {
// ----------------------------------- Aither -----------------------------------
// Bookmarks | Browse | Details | Playlists
unit3dTrackerHandler('a[href*="/download"]')
} else if ( primaryDomain == 'alpharatio' ) {
// ----------------------------------- AlphaRatio -----------------------------------
// Browse | Details | Top 10
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="torrents.php?action=download&id="]',
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'animez' ) {
// --------------------------------- AnimeZ ------------------------------------
// Home | Browse| Bookmarks
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="https://animez.to/torrents/"][href$="/download"]',
}
if ( pageURL.match(/\/torrents\/\d+/) ) {
trackerHandlingOptions.bunnyButtonText = '🐰 quiCKIE'
trackerHandlingOptions.bunnyButtonAddStyles = `
background: #4263eb;
border-radius: 8px;
border; 1px solid transparent;
color: #f9fafb;
box-shadow: 0 1px 1px rgba(229, 231, 235, .06);
padding: 0.6875rem 1.5rem;
font-size: 1rem;
font-weight: 500;
line-height: 1.5rem;
`
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'anthelion' ) {
// ----------------------------------- Anthelion -----------------------------------
// Browse | Collages | Film
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="torrents.php?action=download&id="]',
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'avistaz' ) {
// ----------------------------------- AvistaZ -----------------------------------
// Details
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="https://avistaz.to/download/torrent/"]',
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'bakabt' ) {
// ----------------------------------- BakaBT -----------------------------------
// Details
let trackerHandlingOptions = {
downloadElementsSelector: 'a.download_link[href^="/download/"]',
bunnyButtonFontSize: '140%',
bunnyButtonText: '🐰 quiCKIE',
freeleechStatusSelector: "document.querySelector('span.freeleech')",
bunnyButtonAddStyles: `
background: #153245;
border-radius: 4px;
border: #B6D3E7 solid 2px;
color: #B6D3E7;
display: inline;
font-weight: normal;
margin: 0px 5px 0px 5px;
padding: 3px 4px 4px 4px;
vertical-align: super;
`,
afterBunnyButtonCreation: function(elements) {
// The actions to take after the bunnyButtons have been created...
// Decrease the width of the site DL button so that everything fits onto a single row
elements.downloadElements[0].style.width = '395px'
},
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'beyond-hd' ) {
// ----------------------------------- Beyond-HD -----------------------------------
// Browse | Details | Homepage | Library
unit3dTrackerHandler('a[href^="https://beyond-hd.me/download/"]')
} else if ( primaryDomain == 'bibliotik' ) {
// ----------------------------------- Bibliotik -----------------------------------
// Browse | Details | Seeing\Snatched\Leeching\Uploads
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="/torrents/"][title="Download"]',
bunnyButtonFontSize: '120%',
bunnyButtonAddStyles: 'vertical-align: bottom',
// These status selectors are currently only working on the users seeding\snatched page
seedingStatusSelector: `downloadElement.closest('tr').querySelector('a.seeders').nextSibling.baseURI.match(/seeding/)`,
snatchedStatusSelector: `downloadElement.closest('tr').querySelector('a.snatches').nextSibling.baseURI.match(/snatches/)`,
}
// This is a details page, so apply styling to the only bunnyButton
if ( pagePath.match(/\/torrents\/\d+/) ) {
trackerHandlingOptions.bunnyButtonText = '🐰 quiCKIE'
trackerHandlingOptions.bunnyButtonAddStyles = `
background: #153245 !important;
border-radius: 3px;
border: #B6D3E7 solid 1px;
color: #B6D3E7;
font-size: 90%;
margin: 0px 2px 0px 8px;
padding: 2px 5px 2px 5px;
vertical-align: center;
`
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'bitporn' ) {
// ----------------------------------- BitPorn -----------------------------------
// Browse | Details
unit3dTrackerHandler('a[href^="https://bitporn.eu/torrents/download/"]')
} else if ( primaryDomain == 'broadcasthe' ) {
// ----------------------------------- BroadcasTheNet -----------------------------------
// Browse | Series | Season\Episodes
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="torrents.php?action=download&id="]',
seedingStatusSelector: "downloadElement.closest('td').querySelector('a.tor_highlight_seed')",
snatchedStatusSelector: "downloadElement.closest('td').querySelector('a.tor_highlight_snatch')",
}
// This is a browse page (not Season\Episode), so apply styling to all bunnyButtons
if ( pageURL.match(/torrents\.php(?!\?id=\d+)/) ) {
trackerHandlingOptions.afterBunnyButtonCreation = function(elements) {
// The actions to take after the bunnyButtons have been created...
// Style all bunnyButtons, giving them a square-type look to more closely match the site buttons
for ( let bunnyButton of elements.bunnyButtons ) {
bunnyButton.textContent = '🐰'
bunnyButton.setAttribute('style', `${bunnyButton.style.cssText}
background: #153245;
border-radius: 3px;
border: #B6D3E7 solid 1px;
color: #B6D3E7;
font-size: 80%;
padding: 2px 2px 2px 2px;
vertical-align: unset;`)
}
}
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'cinemaz' ) {
// ----------------------------------- CinemaZ -----------------------------------
// Details
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="https://cinemaz.to/download/torrent/"]',
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'clearjav' ) {
// ----------------------------------- ClearJAV -----------------------------------
// Bookmarks | Browse | Details | Movies| Playlists
unit3dTrackerHandler('a[href^="https://clearjav.com/torrents/download/"]')
} else if ( primaryDomain == 'deepbassnine' ) {
// ----------------------------------- DeepBassNine -----------------------------------
// Album | Artist | Browse
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="torrents.php?action=download&id="]',
}
quickieTrackerHandler(trackerHandlingOptions)
} else if ( primaryDomain == 'digitalcore' ) {
// ---------------------------------- DigitalCore ---------------------------------
// Browse | Details | Home
if ( pageURL.match(/\/torrent\/\d+/) ) {
// The torrent details page
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="/api/v1/torrents/download"]:has(i.fa-download)',
bunnyButtonText: '🐰 quiCKIE',
bunnyButtonAddStyles: `
background: #252525;
border-radius: 3px;
border: #323232 solid 1px;
color: #ccc;
font-size: 12px;
margin-left: 11.033px;
padding: 1px 39.817px;
vertical-align: middle;
`
}
let observer = new MutationObserver(function(mutations) {
quickieTrackerHandler(trackerHandlingOptions)
})
let target = document.getElementById('contentContainer')
let config = { childList: true }
observer.observe(target, config)
} else if ( pagePath.match(/^\/?$/) ) {
// The homepage
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="/api/v1/torrents/download"]',
enablePaginationLooping: true,
}
quickieTrackerHandler(trackerHandlingOptions)
} else {
// The browse page
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="/api/v1/torrents/download"]',
}
let pageObserver = new MutationObserver(async function(pageMutations) {
// Wait until the <tbody> of is loaded...
let tbodyElement = await waitForElement('torrents-table[torrents] tbody', document.getElementById('contentContainer'))
try {
let torrentObserver = new MutationObserver(function(torrentMutations) {
// The actions to take when there are changes to the <tbody>
quickieTrackerHandler(trackerHandlingOptions)
})
torrentObserver.observe(tbodyElement, { childList: true })
} catch(error) {
return
}
})
let target = document.getElementById('contentContainer')
let config = { childList: true }
pageObserver.observe(target, config)
}
} else if ( primaryDomain == 'e-hentai' ) {
// ----------------------------------- E-Hentai -----------------------------------
// Torrents
let trackerHandlingOptions = {
downloadElementsSelector: 'a[href^="https://ehtracker.org/get/"]',
}
if ( pageURL.match(/exhentai/) ) {
trackerHandlingOptions.downloadElementsSelector = 'a[href^="https://exhentai.org/torrent/"]'