forked from dfEric/pandaOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcss
2204 lines (2040 loc) · 128 KB
/
css
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
|url-status=usurped=*name-true
插件配置信息请参考插件配置文档或插件配置文件package.json 关于package.json请参考:Android uni-app原生插件开发文档
{
"nativePlugins": [
{
"plugins": [
{
"type": "module",
"name": "DCloud-RichAlert",
"class": "uni.dcloud.io.uniplugin_richalert.RichAlertWXModule"
}
]
}
]
}
复制代码
# 6. 配置gradle文件
添加指定依赖
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.aar'])
implementation "com.android.support:recyclerview-v7:28.0.0"
implementation "com.android.support:support-v4:28.0.0"
implementation "com.android.support:appcompat-v7:28.0.0"
implementation 'com.alibaba.android:bindingx-core:1.0.3'
implementation 'com.alibaba.android:bindingx_weex_plugin:1.0.3'
implementation 'com.squareup.okhttp:okhttp:2.3.0'
implementation 'com.squareup.okhttp:okhttp-ws:2.3.0'
// 基座需要,必须添加
implementation 'com.github.bumptech.glide:glide:4.9.0'
}
// ==UserScript==
// @name Privacy Redirector
// @name:bg Пренасочване на поверителността
// @name:br Rediretor de privacidade
// @name:cs Přesměrování soukromí
// @name:de Datenschutz Umleiter
// @name:da Omdirigeringsenhed for privatlivets fred
// @name:et Privaatsuse ümbersuunaja
// @name:es Redirección de privacidad
// @name:fi Yksityisyydensuojan uudelleenohjaus
// @name:fr Redirecteur de confidentialité
// @name:el Επανακατευθυντής απορρήτου
// @name:hu Adatvédelmi átirányító
// @name:id Pengarah Privasi
// @name:it Reindirizzatore di privacy
// @name:ja プライバシーリダイレクト
// @name:lt Privatumo nukreipiklis
// @name:lv Konfidencialitātes pāradresētājs
// @name:nl Privacy-omleiding
// @name:pl Przekierownik prywatności
// @name:pt Redirector de Privacidade
// @name:ro Redirector de confidențialitate
// @name:ru Перенаправление конфиденциальности
// @name:sv Omdirigering av sekretess
// @name:sl Preusmerjevalnik zasebnosti
// @name:sk Presmerovanie súkromia
// @name:tr Gizlilik Yönlendiricisi
// @name:uk Редиректор конфіденційності
// @name:zh 隐私重定向器
// @name:zh-CN 隐私重定向器
// @description Redirect social media platforms to their privacy respecting frontends
// @description:bg Пренасочване на платформите за социални медии към заглавните им страници, съобразени с поверителността
// @description:br Redirecionando as plataformas de mídia social para suas primeiras páginas de privacidade
// @description:cs Přesměrování platforem sociálních médií na jejich titulní stránky šetrné k soukromí
// @description:de Leitet von Social-Media-Plattformen auf deren jeweilige datenschutzfreundlicheren Frontends
// @description:da Omdirigering af sociale medieplatforme til deres privatlivsvenlige forsider
// @description:et Sotsiaalmeediaplatvormide ümbersuunamine nende privaatsussõbralikele esilehtedele
// @description:es Redirigir las plataformas de medios sociales a sus portadas respetuosas con la privacidad
// @description:fi Sosiaalisen median alustojen ohjaaminen yksityisyyden suojaa edistäville etusivuille.
// @description:fr Rediriger les plateformes de médias sociaux vers leurs pages d'accueil respectueuses de la vie privée
// @description:el Αναπροσανατολισμός των πλατφορμών κοινωνικής δικτύωσης στις μπροστινές σελίδες τους που είναι φιλικές προς το απόρρητο
// @description:hu A közösségi médiaplatformok átirányítása az adatvédelem-barát kezdőlapokra
// @description:id Mengarahkan platform media sosial ke halaman depan yang ramah privasi
// @description:it Reindirizzare le piattaforme di social media verso le loro pagine frontali che rispettano la privacy
// @description:ja ソーシャルメディアプラットフォームをプライバシーに配慮したフロントページにリダイレクトする
// @description:lt Socialinės žiniasklaidos platformų nukreipimas į privatumą užtikrinančius pirmuosius puslapius
// @description:lv Sociālo plašsaziņas līdzekļu platformu pāradresēšana uz to privātumam draudzīgajām pirmajām lapām.
// @description:nl Sociale-mediaplatforms omleiden naar hun privacyvriendelijke voorpagina's
// @description:pl Przekierowanie platform mediów społecznościowych na ich przyjazne dla prywatności strony tytułowe
// @description:pt Redireccionar as plataformas de redes sociais para as suas primeiras páginas amigas da privacidade
// @description:ro Redirecționarea platformelor de socializare către paginile lor de început care respectă viața privată
// @description:ru Перенаправление платформ социальных сетей на их главные страницы, дружественные к конфиденциальности
// @description:sv Omdirigera sociala medieplattformar till deras integritetsvänliga förstasidor.
// @description:sl preusmeritev platform družabnih medijev na njihove naslovne strani, ki so prijazne do zasebnosti.
// @description:sk Presmerovanie platforiem sociálnych médií na ich úvodné stránky, ktoré chránia súkromie
// @description:tr Sosyal medya platformlarını, gizliliğe saygı duyan önyüzlerine yönlendirir
// @description:uk Перенаправлення соціальних медіа-платформ на їхні головні сторінки, дружні до приватності
// @description:zh 将社交媒体平台重定向到其隐私友好的首页
// @description:zh-CN 将社交媒体平台重定向到其隐私友好的首页
// @namespace https://github.com/dybdeskarphet/privacy-redirector
// @author Ahmet Arda Kavakcı
// @license GPLv3
// @version 1.3.4
// @supportURL https://github.com/dybdeskarphet/privacy-redirector
// @run-at document-start
// @match *://*.fandom.com/*
// @match *://*.google.com/*
// @match *://*.imdb.com/*
// @match *://*.imgur.com/*
// @match *://*.instagram.com/*
// @match *://*.medium.com/*
// @match *://*.quora.com/*
// @match *://*.reddit.com/*
// @match *://*.reuters.com/*
// @match *://*.tiktok.com/*
// @match *://*.twitter.com/*
// @match *://*.wikipedia.org/*
// @match *://*.youtube.com/*
// @match *://imgur.com/*
// @match *://instagram.com/*
// @match *://medium.com/*
// @match *://news.ycombinator.com/*
// @match *://reddit.com/*
// @match *://translate.google.com/*
// @match *://twitter.com/*
// @match *://youtube.com/*
// ==/UserScript==
/*
___ _ _ ___ _____ _____
/ _ \| \ | | / _ \| ___| ___|
| | | | \| |_____| | | | |_ | |_
| |_| | |\ |_____| |_| | _| | _|
\___/|_| \_| \___/|_| |_|
CHANGE THE RELEVANT VALUE TO "false" TO
DISABLE THE REDIRECTION/FARSIDE FOR THAT
PARTICULAR PLATFORM */
// REDIRECTON / FARSIDE
let fandom = [true, true];
let google = [true, true];
let gtranslate = [true, true];
let hackernews = [true, true];
let imdb = [true, true];
let imgur = [true, true];
let instagram = [false, true];
let medium = [true, true];
let quora = [true, true];
let reddit = [true, true];
let reuters = [true, true];
let tiktok = [true, true];
let twitter = [true, true];
let wikipedia = [true, true];
let youtube = [true, true];
// PREFERRED FRONTEND
let youtubeFrontend = "piped"; // accepts "invidious", "piped"
let redditFrontend = "libreddit"; // accepts "libreddit", "teddit"
let googleFrontend = "searxng"; // accepts "searx", "searxng"
// // // // // // // // // // // // //
/*
___ _
|_ _|_ __ ___| |_ __ _ _ __ ___ ___ ___
| || '_ \/ __| __/ _` | '_ \ / __/ _ \/ __|
| || | | \__ \ || (_| | | | | (_| __/\__ \
|___|_| |_|___/\__\__,_|_| |_|\___\___||___/
LIST OF INSTANCES TO USE IF FARSIDE IS NOT ENABLED
*/
let bibliogramInstances = [
"bibliogram.1d4.us",
"ig.tokhmi.xyz"
];
let breezewikiInstances = [
"breezewiki.com",
"breezewiki.pussthecat.org",
"breezewiki.esmailelbob.xyz",
"bw.vern.cc",
];
let invidiousInstances = [
"invidious.snopyta.org",
"yewtu.be",
"vid.puffyan.us",
"invidious.namazso.eu",
];
let pipedInstances = [
"piped.video",
"piped.moomoo.me",
"piped.syncpundit.io",
"piped.mha.fi",
];
let libredditInstances = [
"libreddit.spike.codes",
"libreddit.org",
"libreddit.kavin.rocks",
"reddit.invak.id",
];
let libremdbInstances = [
"libremdb.iket.me",
"libremdb.pussthecat.org",
"libremdbeu.herokuapp.com",
"lmdb.tokhmi.xyz",
];
let lingvaInstances = [
"lingva.ml",
"translate.igna.wtf",
"translate.plausibility.cloud",
"translate.projectsegfau.lt",
];
let nitterInstances = [
"nitter.net",
"nitter.pussthecat.org",
"nitter.fdn.fr",
"nitter.1d4.us",
];
let proxitokInstances = [
"proxitok.pabloferreiro.es",
"proxitok.pussthecat.org",
"tok.habedieeh.re",
"proxitok.esmailelbob.xyz",
];
let quetreInstances = [
"quetre.iket.me",
"quora.vern.cc",
"quetre.pussthecat.org",
"quetre.tokhmi.xyz",
];
let rimgoInstances = [
"i.bcow.xyz",
"rimgo.pussthecat.org",
"rimgo.totaldarkness.net",
"rimgo.bus-hit.me",
];
let scribeInstances = [
"scribe.rip",
"scribe.nixnet.services",
"scribe.citizen4.eu",
"scribe.bus-hit.me",
];
let tedditInstances = [
"teddit.pussthecat.org",
"teddit.ggc-project.de",
"teddit.domain.glass",
"teddit.zaggy.nl",
];
let wikilessInstances = [
"wikiless.org",
"wikiless.sethforprivacy.com",
"wiki.604kph.xyz",
"wikiless.lunar.icu",
];
let searxInstances = [
"search.bus-hit.me",
"search.projectsegfau.lt",
"northboot.xyz",
"opnxng.com",
];
let searxngInstances = [
"baresearch.org",
"dynabyte.ca",
"search.bus-hit.me",
"search.leptons.xyz",
];
let farsideInstance = "farside.link";
// // // // // // // // // // // // //
let debug_mode = false;
if (debug_mode == true) {
alert(
"Hostname: " +
window.location.hostname +
"\nPath: " +
window.location.pathname +
"\nQuery: " +
window.location.search +
"\nHash: " +
window.location.hash
);
}
function redirectInstagram() {
if (instagram[0] == false) {
return;
}
window.stop();
alert("Bibliogram is discontinued, you may want to disable the redirection.");
var selectedInstance = "";
if (instagram[1] == false) {
selectedInstance =
bibliogramInstances[
Math.floor(Math.random() * bibliogramInstances.length)
];
} else {
selectedInstance = `${farsideInstance}/bibliogram`;
}
if (window.location.pathname.startsWith("/accounts/login/")) {
if (window.location.search.indexOf("/reel/") != -1) {
// reels
let newURL =
window.location.protocol +
"//" +
selectedInstance +
window.location.pathname.replace("/accounts/login/", "/") +
window.location.search.replace("?next=/reel", "p") +
window.location.hash;
window.location.replace(newURL);
} else if (window.location.search.indexOf("/p/") == -1) {
// user pages - it will crash if it's not the second last block
let newURL =
window.location.protocol +
"//" +
selectedInstance +
window.location.pathname.replace("/accounts/login/", "/") +
window.location.search.replace("?next=", "u") +
window.location.hash;
window.location.replace(newURL);
} else {
// probably a post
let newURL =
window.location.protocol +
"//" +
selectedInstance +
window.location.pathname.replace("/accounts/login/", "") +
window.location.search.replace("?next=", "") +
window.location.hash;
window.location.replace(newURL);
}
} else {
if (window.location.pathname == "/") {
// home page
location.hostname = selectedInstance;
} else if (window.location.pathname.startsWith("/reel/")) {
// reel
let newURL =
window.location.protocol +
"//" +
selectedInstance +
window.location.pathname.replace("/reel", "/p") +
window.location.hash;
window.location.replace(newURL);
} else if (!window.location.pathname.startsWith("/p/")) {
// user page - it will crash if it's not the second last block
let newURL =
window.location.protocol +
"//" +
selectedInstance +
"/u" +
window.location.pathname +
window.location.search +
indow.location.hash;
window.location.replace(newURL);
} else {
// probably a post
location.hostname = selectedInstance;
}
}
}
function redirectTwitter() {
if (twitter[0] == false) {
return;
}
window.stop();
var selectedInstance = "";
if (twitter[1] == false) {
selectedInstance =
nitterInstances[Math.floor(Math.random() * nitterInstances.length)];
} else {
selectedInstance = `${farsideInstance}/nitter`;
}
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
function redirectReddit() {
if (reddit[0] == false) {
return;
}
window.stop();
var selectedTeddit = "";
var selectedLibreddit = "";
if (reddit[1] == false) {
selectedInstance = eval(redditFrontend + "Instances")[
Math.floor(Math.random() * eval(redditFrontend + "Instances.length"))
];
} else {
selectedInstance = `${farsideInstance}/${redditFrontend}`;
}
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
function redirectYoutube() {
if (youtube[0] == false) {
return;
}
window.stop();
var selectedInstance = "";
if (youtube[1] == false) {
selectedInstance = eval(youtubeFrontend + "Instances")[
Math.floor(Math.random() * eval(youtubeFrontend + "Instances.length"))
];
} else {
selectedInstance = `${farsideInstance}/${youtubeFrontend}`;
}
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
function redirectTiktok() {
if (tiktok[0] == false) {
return;
}
window.stop();
var selectedInstance = "";
if (tiktok[1] == false) {
selectedInstance =
proxitokInstances[Math.floor(Math.random() * proxitokInstances.length)];
} else {
selectedInstance = `${farsideInstance}/proxitok`;
}
if (window.location.pathname.startsWith("/discover")) {
let newURL = `${
window.location.protocol
}//${selectedInstance}${window.location.pathname.replace(
"discover",
"tag"
)}${window.location.hash}`;
window.location.replace(newURL);
} else if (window.location.pathname.search(/[a-z][a-z]\-[A-Z][A-Z]/g) != -1) {
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
} else {
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
}
function redirectImgur() {
if (imgur[0] == false) {
return;
}
window.stop();
var selectedInstance = "";
if (imgur[1] == false) {
selectedInstance =
rimgoInstances[Math.floor(Math.random() * rimgoInstances.length)];
} else {
selectedInstance = `${farsideInstance}/rimgo`;
}
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
function redirectMedium() {
if (medium[0] == false || window.location.pathname == "/") {
return;
}
window.stop();
var selectedInstance = "";
if (medium[1] == false) {
selectedInstance =
scribeInstances[Math.floor(Math.random() * scribeInstances.length)];
} else {
selectedInstance = `${farsideInstance}/scribe`;
}
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
function redirectYoutubeMusic() {
if (youtube[0] == false) {
return;
}
window.stop();
if (window.location.pathname.startsWith("/playlist")) {
let newURL = `${window.location.protocol}//beatbump.ml${
window.location.pathname
}${window.location.search.replace("?list=", "/VL")}${window.location.hash}`;
window.location.replace(newURL);
} else if (window.location.pathname.startsWith("/channel")) {
let newURL = `${
window.location.protocol
}//beatbump.ml${window.location.pathname.replace("/channel", "/artist")}${
window.location.search
}${window.location.hash}`;
window.location.replace(newURL);
} else if (window.location.pathname.startsWith("/explore")) {
let newURL = `${
window.location.protocol
}//beatbump.ml${window.location.pathname.replace("/explore", "/trending")}${
window.location.search
}${window.location.hash}`;
window.location.replace(newURL);
} else if (window.location.pathname.startsWith("/moods_and_genres")) {
let newURL = `${
window.location.protocol
}//beatbump.ml${window.location.pathname.replace(
"/moods_and_genres",
"/explore"
)}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
} else {
location.hostname = "beatbump.ml";
}
}
function redirectHackerNews() {
if (hackernews[0] == false) {
return;
}
window.stop();
let newURL = `${window.location.protocol}//hn.algolia.com`;
window.location.replace(newURL);
}
function redirectGTranslate() {
if (gtranslate[0] == false) {
return;
}
window.stop();
var selectedInstance = "";
if (gtranslate[1] == false) {
selectedInstance =
lingvaInstances[Math.floor(Math.random() * lingvaInstances.length)];
} else {
selectedInstance = `${farsideInstance}/lingva`;
}
if (window.location.search != "") {
let newURL =
window.location.protocol +
"//" +
selectedInstance +
window.location.pathname +
window.location.search
.replace(/\?hl=tr/, "")
.replace(/.sl=/, "")
.replace("&tl=", "/")
.replace("&text=", "/")
.replace("&op=translate", "") +
window.location.hash;
window.location.replace(newURL);
} else {
let newURL = window.location.protocol + "//" + selectedInstance;
window.location.replace(newURL);
}
}
function redirectReuters() {
if (reuters[0] == false) {
return;
}
window.stop();
location.hostname = "neuters.de";
}
function redirectWikipedia() {
if (wikipedia[0] == false) {
return;
}
window.stop();
let langCodeIndex = window.location.hostname.search(/^[a-z][a-z]\./);
var selectedInstance = "";
if (wikipedia[1] == false) {
selectedInstance =
wikilessInstances[Math.floor(Math.random() * wikilessInstances.length)];
} else {
selectedInstance = `${farsideInstance}/wikiless`;
}
if (langCodeIndex != -1) {
let newURL =
window.location.protocol +
"//" +
selectedInstance +
window.location.pathname +
"?lang=" +
window.location.hostname[langCodeIndex] +
window.location.hostname[langCodeIndex + 1] +
window.location.hash;
window.location.replace(newURL);
} else {
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}?lang=en${window.location.hash}`;
window.location.replace(newURL);
}
}
function redirectImdb() {
if (imdb[0] == false) {
return;
}
if (window.location.pathname.startsWith("/title/")) {
window.stop();
var selectedInstance = "";
if (imdb[1] == false) {
selectedInstance =
libremdbInstances[Math.floor(Math.random() * libremdbInstances.length)];
} else {
selectedInstance = `${farsideInstance}/libremdb`;
}
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
}
function redirectQuora() {
if (quora[0] == false) {
return;
}
window.stop();
var selectedInstance = "";
if (quora[1] == false) {
selectedInstance =
quetreInstances[Math.floor(Math.random() * quetreInstances.length)];
} else {
selectedInstance = `${farsideInstance}/quetre`;
}
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
}
function redirectFandom() {
if (fandom[0] == false) {
return;
}
let randomInstance =
breezewikiInstances[Math.floor(Math.random() * breezewikiInstances.length)];
let fandomName = window.location.hostname.replace(/\..*/, "");
let newURL = "";
window.stop();
if (fandomName !== "www") {
newURL = `${window.location.protocol}//${randomInstance}/${fandomName}${window.location.pathname}${window.location.search}${window.location.hash}`;
} else {
newURL = `${window.location.protocol}//${randomInstance}`;
}
window.location.replace(newURL);
}
function redirectGoogle() {
if (google[0] == false) {
return;
}
window.stop();
var selectedInstance = "";
if (google[1] == false) {
selectedInstance = eval(googleFrontend + "Instances")[
Math.floor(Math.random() * eval(googleFrontend + "Instances.length"))
];
} else {
selectedInstance = `${farsideInstance}/${googleFrontend}`;
}
if (window.location.pathname.match("/")) {
let newURL = `${window.location.protocol}//${selectedInstance}${window.location.pathname}${window.location.search}${window.location.hash}`;
window.location.replace(newURL);
} else {
let newURL = `${window.location.protocol}//${selectedInstance}${
window.location.pathname
}${window.location.search.match(/\?q.+?(?=\&)/)}`;
window.location.replace(newURL);
}
}
let urlHostname = window.location.hostname;
switch (urlHostname) {
case "www.instagram.com":
redirectInstagram();
break;
case "twitter.com":
case "mobile.twitter.com":
redirectTwitter();
break;
case "www.reddit.com":
case "old.reddit.com":
redirectReddit();
break;
case "www.youtube.com":
case "m.youtube.com":
redirectYoutube();
break;
case "www.tiktok.com":
redirectTiktok();
break;
case "music.youtube.com":
redirectYoutubeMusic();
break;
case "news.ycombinator.com":
redirectHackerNews();
break;
case "translate.google.com":
redirectGTranslate();
break;
case "www.reuters.com":
redirectReuters();
break;
case "www.imdb.com":
redirectImdb();
break;
case "www.quora.com":
redirectQuora();
break;
case "www.google.com":
redirectGoogle();
break;
default:
if (urlHostname.includes("medium.com")) {
redirectMedium();
} else if (urlHostname.includes("imgur.com")) {
redirectImgur();
} else if (urlHostname.includes("wikipedia.org")) {
redirectWikipedia();
} else if (urlHostname.includes("fandom.com")) {
redirectFandom();
}
break;
}
// ==UserScript==
// @name 统计屏蔽
// @namespace https://github.com/tanapok/Seeding-Statistics
// @version 1.1.0
// @description 保种统计是一个用于统计用户做种情况的脚本,可用于 NexusPHP 架构的 PT 站点。脚本可以统计用户的做种数据,并根据站点进行分类汇总,详细展示用户做种详情。可以统计的数据包括站点名称、做种数量、做种体积、平均保种人数、做种上传总量、做种下载总量、平均做种时间等。
// @author tanapok
// @match https://wintersakura.net/userdetails.php?id=*
// @match https://carpt.net/userdetails.php?id=*
// @match https://hdvideo.one/userdetails.php?id=*
// @match https://ultrahd.net/userdetails.php?id=*
// @match *://*/userdetails.php?id=*
// @icon https://download.wintersakura.net/uploads/2022/11/08/63693c03f0e2a.png
// @grant none
// @license GNU GPLv3
// ==/UserScript==
var siteData = [
{
siteName: 'WinterSakura',
siteUrl: 'wintersakura.net',
spiderModel: 'NexusPHP', // 此参数暂未使用
siteGroups: ['-SakuraWEB', '-SakuraSUB', '-WS', '-WScode', '-Sakura Academic'],
userNameHTMLSelector: 'h1 > span',
seedListSelector: '#ka1', // 做种列表区域选择器
seedItemsSelector: 'table > tbody:first-child > tr:not(:first-child)', // 做种列表条目选择器
seedTitleSelector: 'td:nth-child(2) > a:nth-child(1)',
seedSizeSelector: 'td:nth-child(4)',
seedersNumberSelector: 'td:nth-child(5)',
seedUploadSizeSelector: 'td:nth-child(7)',
seedDownloadSizeSelector: 'td:nth-child(8)',
seedTimeSelector: 'td:nth-child(10)',
hasPagination: false,
nextPageButtonSelector: 'p.nexus-pagination:nth-child(3) > a:nth-child(2) > b:nth-child(1)',
theLastPageFlagSelector: 'font.gray:nth-child(2) > b:nth-child(1)', // false for the end of pages
theLastPageFlagText: '下一页',
seedSize: 0,
seedItemsNumber: 0,
seedersNumber: 0,
seedUploadSize: 0,
seedDownloadSize: 0,
seedTime: 0,
},
{
siteName: 'CarPT',
siteUrl: 'carpt.net',
spiderModel: 'NexusPHP', // 此参数暂未使用
siteGroups: ['-CarPT'],
userNameHTMLSelector: 'h1 > span',
seedListSelector: '#ka1', // 做种列表区域选择器
seedItemsSelector: 'table > tbody:first-child > tr:not(:first-child)', // 做种列表条目选择器
seedTitleSelector: 'td:nth-child(2) > a:nth-child(1)',
seedSizeSelector: 'td:nth-child(4)',
seedersNumberSelector: 'td:nth-child(5)',
seedUploadSizeSelector: 'td:nth-child(7)',
seedDownloadSizeSelector: 'td:nth-child(8)',
seedTimeSelector: 'td:nth-child(10)',
hasPagination: false,
nextPageButtonSelector: 'p.nexus-pagination:nth-child(3) > a:nth-child(2) > b:nth-child(1)',
theLastPageFlagSelector: 'font.gray:nth-child(2) > b:nth-child(1)', // false for the end of pages
theLastPageFlagText: '下一页',
seedSize: 0,
seedItemsNumber: 0,
seedersNumber: 0,
seedUploadSize: 0,
seedDownloadSize: 0,
seedTime: 0,
},
{
siteName: 'HDVideo',
siteUrl: 'hdvideo.one',
spiderModel: 'NexusPHP', // 此参数暂未使用
siteGroups: ['-HDVWEB', '-HDVMV', '@HDVWEB', '@HDVMV'],
userNameHTMLSelector: 'h1 > span',
seedListSelector: '#ka1', // 做种列表区域选择器
seedItemsSelector: 'table > tbody:first-child > tr:not(:first-child)', // 做种列表条目选择器
seedTitleSelector: 'td:nth-child(2) > a:nth-child(1)',
seedSizeSelector: 'td:nth-child(4)',
seedersNumberSelector: 'td:nth-child(5)',
seedUploadSizeSelector: 'td:nth-child(7)',
seedDownloadSizeSelector: 'td:nth-child(8)',
seedTimeSelector: 'td:nth-child(10)',
hasPagination: false,
nextPageButtonSelector: 'p.nexus-pagination:nth-child(3) > a:nth-child(2) > b:nth-child(1)',
theLastPageFlagSelector: 'font.gray:nth-child(2) > b:nth-child(1)', // false for the end of pages
theLastPageFlagText: '下一页',
seedSize: 0,
seedItemsNumber: 0,
seedersNumber: 0,
seedUploadSize: 0,
seedDownloadSize: 0,
seedTime: 0,
},
{
siteName: 'UltraHD',
siteUrl: 'ultrahd.net',
spiderModel: 'NexusPHP', // 此参数暂未使用
siteGroups: ['-UltraTV', '-UltraHD', '@UltraTV', '@UltraHD'],
userNameHTMLSelector: 'h1 > span',
seedListSelector: '#ka1', // 做种列表区域选择器
seedItemsSelector: 'table > tbody:first-child > tr:not(:first-child)', // 做种列表条目选择器
seedTitleSelector: 'td:nth-child(2) > a:nth-child(1)',
seedSizeSelector: 'td:nth-child(4)',
seedersNumberSelector: 'td:nth-child(5)',
seedUploadSizeSelector: 'td:nth-child(7)',
seedDownloadSizeSelector: 'td:nth-child(8)',
seedTimeSelector: 'td:nth-child(10)',
hasPagination: false,
nextPageButtonSelector: 'p.nexus-pagination:nth-child(3) > a:nth-child(2) > b:nth-child(1)',
theLastPageFlagSelector: 'font.gray:nth-child(2) > b:nth-child(1)', // false for the end of pages
theLastPageFlagText: '下一页',
seedSize: 0,
seedItemsNumber: 0,
seedersNumber: 0,
seedUploadSize: 0,
seedDownloadSize: 0,
seedTime: 0,
},
{
siteName: 'QHstudIo',
siteUrl: 'google.com', // 仅支持该站点的小组,并未对该站点做适配
spiderModel: 'NexusPHP', // 此参数暂未使用
siteGroups: ['-QHstudIo', '@QHstudIo'],
userNameHTMLSelector: 'h1 > span',
seedListSelector: '#ka1', // 做种列表区域选择器
seedItemsSelector: 'table > tbody:first-child > tr:not(:first-child)', // 做种列表条目选择器
seedTitleSelector: 'td:nth-child(2) > a:nth-child(1)',
seedSizeSelector: 'td:nth-child(4)',
seedersNumberSelector: 'td:nth-child(5)',
seedUploadSizeSelector: 'td:nth-child(7)',
seedDownloadSizeSelector: 'td:nth-child(8)',
seedTimeSelector: 'td:nth-child(10)',
hasPagination: false,
nextPageButtonSelector: 'p.nexus-pagination:nth-child(3) > a:nth-child(2) > b:nth-child(1)',
theLastPageFlagSelector: 'font.gray:nth-child(2) > b:nth-child(1)', // false for the end of pages
theLastPageFlagText: '下一页',
seedSize: 0,
seedItemsNumber: 0,
seedersNumber: 0,
seedUploadSize: 0,
seedDownloadSize: 0,
seedTime: 0,
},
{
siteName: 'Audiences',
siteUrl: 'google.com', // 仅支持该站点的小组,并未对该站点做适配
spiderModel: 'NexusPHP', // 此参数暂未使用
siteGroups: ['-Audies', '@Audies', '-ADE', '@ADE', '@ADWeb', '-ADWeb', '-ADAudio', '-ADEBook', '-ADMusic', '@ADAudio', '@ADEBook', '@ADMusic'],
userNameHTMLSelector: 'h1 > span',
seedListSelector: '#ka1', // 做种列表区域选择器
seedItemsSelector: 'table > tbody:first-child > tr:not(:first-child)', // 做种列表条目选择器
seedTitleSelector: 'td:nth-child(2) > a:nth-child(1)',
seedSizeSelector: 'td:nth-child(4)',
seedersNumberSelector: 'td:nth-child(5)',
seedUploadSizeSelector: 'td:nth-child(7)',
seedDownloadSizeSelector: 'td:nth-child(8)',
seedTimeSelector: 'td:nth-child(10)',
hasPagination: false,
nextPageButtonSelector: 'p.nexus-pagination:nth-child(3) > a:nth-child(2) > b:nth-child(1)',
theLastPageFlagSelector: 'font.gray:nth-child(2) > b:nth-child(1)', // false for the end of pages
theLastPageFlagText: '下一页',
seedSize: 0,
seedItemsNumber: 0,
seedersNumber: 0,
seedUploadSize: 0,
seedDownloadSize: 0,
seedTime: 0,
},
{
siteName: 'CHDBits',
siteUrl: 'google.com', // 仅支持该站点的小组,并未对该站点做适配
spiderModel: 'NexusPHP', // 此参数暂未使用
siteGroups: ['-CHDBits', '-CHDTV', '-CHDPAD', '-CHDWEB', '-CHDHKTV', '-StBOX', '-OneHD', '@CHDBits', '@CHDTV', '@CHDPAD', '@CHDWEB', '@CHDHKTV', '@StBOX', '@OneHD'],
userNameHTMLSelector: 'h1 > span',
seedListSelector: '#ka1', // 做种列表区域选择器
seedItemsSelector: 'table > tbody:first-child > tr:not(:first-child)', // 做种列表条目选择器
seedTitleSelector: 'td:nth-child(2) > a:nth-child(1)',
seedSizeSelector: 'td:nth-child(4)',
seedersNumberSelector: 'td:nth-child(5)',
seedUploadSizeSelector: 'td:nth-child(7)',