forked from AirBashX/UserScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAnnoyancesInterception.user.js
1222 lines (1211 loc) · 36.3 KB
/
AnnoyancesInterception.user.js
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==
// @name 骚扰拦截
// @version 1.4.12
// @namespace airbash/AnnoyancesInterception
// @homepageURL https://github.com/AirBashX/UserScript
// @author airbash
// @description 手机、电脑全平台通用:自动拦截或删除`下载弹窗`、`悬浮按钮`等影响用户体验的元素;长期维护:CSDN、简书、知乎、知乎专栏、百度搜索、百家号、百度贴吧、百度文库、百度新闻、新浪新闻、腾讯视频、优酷视频、爱奇艺、好看视频、哔哩哔哩、B站专栏、B站笔记、西瓜视频、抖音、丁香园、健康界、微博、新浪财经、东方财富网、电子发烧友、人民网、新京报、观察者网、澎湃新闻、凤凰新闻、网易新闻、今日头条、东方资讯、虎嗅、虎扑、豆瓣、中关村在线、太平洋电脑、太平洋汽车网、汽车之家、太平洋汽车网、taptap、it之家、360doc、开源中国、segmentfault、W3CSchool、阿里云开发者社区、腾讯云开发者社区、华为云开发者社区、36氪、雪球、天眼查、站酷、小红书、中国知网、装备前线、必应搜索、什么值得买
// @match *://*.csdn.net/*
// @match *://*.jianshu.com/*
// @match *://juejin.cn/*
// @match *://*.zhihu.com/*
// @match *://tieba.baidu.com/*
// @match *://baijiahao.baidu.com/s*
// @match *://mbd.baidu.com/newspage/data/*
// @match *://news.baidu.com/news*
// @match *://m.baidu.com/sf_baijiahao/*
// @match *://view.inews.qq.com/*
// @match *://xw.qq.com/*
// @match *://m.sohu.com/a/*
// @match *://m.v.qq.com/*
// @match *://*.youku.com/*
// @match *://*.iqiyi.com/*
// @match *://haokan.baidu.com/*
// @match *://*.1905.com/*
// @match *://*.baidu.com/*
// @match *://*.bilibili.com/*
// @match *://3g.dxy.cn/*
// @match *://www.cn-healthcare.com/*
// @match *://*.sina.cn/*
// @match *://m.weibo.cn/*
// @match *://wap.eastmoney.com/*
// @match *://mguba.eastmoney.com/*
// @match *://*.ixigua.com/*
// @match *://www.douyin.com/*
// @match *://m.elecfans.com/*
// @match *://app.people.cn/*
// @match *://m.bjnews.com.cn/detail/*
// @match *://*.guancha.cn/*
// @match *://m.thepaper.cn/newsDetail_forward*
// @match *://*.ifeng.com/*
// @match *://m.163.com/*
// @match *://3g.163.com/*
// @match *://m.toutiao.com/article/*
// @match *://www.toutiao.com/article/*
// @match *://mini.eastday.com/nsa/*
// @match *://m.huxiu.com/*
// @match *://m.hupu.com/*
// @match *://m.douban.com/*
// @match *://g.pconline.com.cn/*
// @match *://m.zol.com.cn/*
// @match *://wap.zol.com.cn/*
// @match *://www.autohome.com.cn/*
// @match *://*.m.autohome.com.cn/*
// @match *://m.autohome.com.cn/*
// @match *://m.pcauto.com.cn/*
// @match *://www.taptap.cn/*
// @match *://m.taptap.cn/*
// @match *://m.ithome.com/*
// @match *://www.360doc.com/content/*
// @match *://www.oschina.net/*
// @match *://developer.aliyun.com/article/*
// @match *://huaweicloud.csdn.net/*
// @match *://m.36kr.com/p/*
// @match *://xueqiu.com/*
// @match *://segmentfault.com/q/*
// @match *://www.w3cschool.cn/*
// @match *://m.tianyancha.com/*
// @match *://*.zcool.com.cn/*
// @match *://m.ximalaya.com/*
// @match *://www.xiaohongshu.com/*
// @match *://wap.cnki.net/*
// @match *://www.zfrontier.com/*
// @match *://*.m.smzdm.com/*
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAEi5JREFUeF69Wwl0VVWy3fVCCCCTYLfDl8a2GUImSAIJUSERRI2KCMikIIIKAjYyqsgURBFbZdKPiooDICiKIggOEEBEEkKAJJAEsL9zN7a2okAgybu1/zr3hQc3yRsywF2LtVgv595z9q46VXWq6gjO48MtKfXQ5OSVQEgTWNoUFpvY01s4CZUTUPkJGnZYrt166nwtS87lRMy5ui3IW0ArHpT2ULQBUQcKgGX/lJ7/n/lNofgO1FyoawtgbcOO3TmSZo+o9afWCeCBxAhQ7oIlvUCEwwPwG1ByoJoDugpB/QXq+h1a+jusEIULjWGhMYiLoQwH2RYqHU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2zlegbAzK0zjacI6s9l+vL78gm5gjxc1Qx3IhRI7J6uAk5l1DfHwDhB6bCorJ/R8DcY/sPnhur8w41G5MeHMU13nKnAhBmo6Lx1Gky2rb+lcgLiKiLpq6h0LFtM23BGUVVCZIdsG/g5X62eOqpQEOIu6O6QLqs6bhwPTgQbEAISErZFngLHJVFsxEk8xwDzbNWiBagJIJi1Mk++CWqnyn/NgaE+BVySGm5AyTJzBt9pZJpEJpmiDSZU3Bt9VZJFPCr0CpaZPVPqZ3uezabTog87Gr8CNf3qAqc9UaAV4iBrSLgrpMA2NvEBFe66+yG9BDsFgAdf0HqkdRB8dQKoSwMUpdTQEtuzrramvfMFP+DaS5V2w0ayUYskyy8u0Gx9p6ap0Ax/boGx0OtymSMA5kB4+LO+vytG39y12eVhCE6VgxfclfQlybsLPQZG9rfE22MtLOKQEVDJg5ndULawkNaQrVpqDx/XTBjWK48CugR1Bc9K3s/KFC719tSbz8d/4fEkbgH4G71qYAAAAASUVORK5CYII=
// @run-at document-body
// @grant none
// @license GPL-3.0
// ==/UserScript==
(function () {
"use strict";
/**
* 规则列表
* @type {name/url/items}
*/
const websites = [
{
name: "CSDN",
url: "csdn.net",
items: [
//下载弹窗
".weixin-shadowbox",
//悬浮按钮:打开:狐猴浏览器中的bug
".feed-Sign-weixin",
//悬浮按钮:APP内打开+登录/打开注册(主页)
".feed-Sign-span",
//PC端:弹窗:学生认证
"#csdn-highschool-window",
//PC端:登录弹窗(顶部)
"#csdn-toolbar-profile-nologin",
//PC端:登录弹窗(底部)
".passport-login-tip-container",
],
fun: function () {
/**
* PC端:屏蔽登录弹窗
* @param {list} mutationsList The mutations list
*/
let removeLoginNotice = function (mutationsList) {
for (let mutation of mutationsList) {
for (let node of mutation.addedNodes) {
if (document.querySelector(".passport-login-container")) {
//有登陆弹窗时:模拟点击关闭按钮
let button = node.querySelector("img");
if (button) {
if (LoginFlag == true) {
button.click();
} else {
LoginFlag = true;
}
return;
}
}
}
}
};
let loginBtn = document.querySelector(".toolbar-btn-login>.toolbar-btn-loginfun");
//未登录:
if (loginBtn) {
//添加事件,不拦截
loginBtn.addEventListener("click", function () {
LoginFlag = false;
});
//执行监听
let observer = new MutationObserver(removeLoginNotice);
observer.observe(document, { childList: true, subtree: true });
}
//移动版登录弹窗
if (document.querySelector(".toolbarBack")) {
addStyle(".passport-login-container {display: none !important}");
}
},
},
{
name: "简书",
url: "jianshu.com",
items: [
//下载弹窗
".download-app-guidance",
//悬浮按钮:打开App,看更多相似好文
".call-app-btn",
//悬浮按钮:打开App,看更多好文(首页)
".index_call-app-btn",
//PC端:透明遮挡
"._23ISFX-mask",
//PC端:登录弹窗
"._23ISFX-wrap",
],
overflow: true,
},
{
name: "掘金",
url: "juejin.cn",
items: [
//悬浮按钮:APP内打开
".open-button",
//下载弹窗
".app-open-drawer",
//PC端:下方拓展弹窗(主页)
".recommend-box",
//PC端:登录弹窗(右上角)
".login-popover",
//PC端:登录弹窗(右下角)
".bottom-login-guide",
],
overflow: true,
},
{
name: "知乎发现页",
url: "www.zhihu.com/explore",
items: [
//PC端:登录按钮(发现页)
".ExploreHomePage-specialsLogin",
],
fun: function () {
//发现页:热点和问题高度保持一致;
if (location.href.includes("www.zhihu.com/explore")) {
addStyle(".ExploreHomePage-square > div:nth-child(3){margin: 0px}");
}
},
},
{
name: "知乎",
url: "zhihu.com",
items: [
//悬浮按钮:是否在知乎app内阅读全文
".MobileModal-wrapper",
//悬浮按钮:打开知乎(主页),打开
".OpenInAppButton",
],
overflow: true,
fun: function () {
//PC端拦截登录弹窗
if (!/Mobile|Android|iPhone/i.test(navigator.userAgent)) {
window.addEventListener("DOMContentLoaded", function () {
let loginBtn = document.querySelector(".css-1rwz7is");
//检验是否登录
if (loginBtn) {
//执行监听
let observer = new MutationObserver(removeLoginNotice);
observer.observe(document, { childList: true, subtree: true });
onload = function () {
loginBtn.addEventListener("click", function () {
LoginFlag = false;
});
};
}
});
/**
* 删除登录弹窗
*
* @param {MutationRecord[]} mutationsList The mutations list
* @param {MutationObserver} observer The observer
*/
function removeLoginNotice(mutationsList) {
for (let mutation of mutationsList) {
for (let node of mutation.addedNodes) {
//有登陆弹窗1时:模拟点击关闭按钮
if (node.querySelector(".signFlowModal")) {
let button = node.querySelector(".Button.Modal-closeButton.Button--plain");
if (button) {
if (LoginFlag == true) {
button.click();
} else {
LoginFlag = true;
}
return;
}
}
//拦截登录弹窗2
if (getXpath('//button[text()="立即登录/注册"]', node)) {
getXpath('//button[text()="立即登录/注册"]', node).parentElement.parentElement.remove();
}
}
}
}
}
},
},
{
name: "百度",
url: "baidu.com",
items: [
//悬浮按钮:打开百度
"#J-invoke-baiduApp-float",
],
},
{
name: "百度贴吧",
url: "tieba.baidu.com",
items: [
//悬浮按钮:打开百度贴吧
".nav-bar-bottom",
],
},
{
name: "百度文库1",
url: "/wk.baidu.com/view/",
items: [
//悬浮按钮(上方):百度文库
".wk-student-defense",
],
},
{
name: "百度文库2",
url: "tanbi.baidu.com/h5apptopic/browse/",
items: [
//悬浮按钮(上方):百度文库
".wk-student-limit-jump",
".bartop",
//悬浮按钮(下方):下载App,继续阅读
".wk-bottom-btn",
],
},
{
name: "百家号",
url: "baijiahao.baidu.com/s",
items: [
//悬浮按钮:百度APP内打开
"#bdrainrwDragButton",
],
},
{
name: "百度资讯+百度首页",
url: "mbd.baidu.com/newspage/data",
items: [
//悬浮按钮:百度APP内打开
"#bdrainrwDragButton",
//悬浮按钮:百度APP内播放
".drag-bottom",
],
},
{
name: "腾讯新闻1",
url: "view.inews.qq.com/",
items: [
//固定按钮:打开
".slider-top-bar_sliderWrapper__1Nize",
//悬浮按钮:打开腾讯新闻,看更多热点资讯
".bottom-bar_buttonWrap__NXBe-",
],
},
{
name: "腾讯新闻2",
url: "xw.qq.com/",
items: [
//固定按钮:打开(首页)
"#opeApp",
],
},
{
name: "腾讯视频",
url: "m.v.qq.com",
items: [
//下载弹窗
".at-app-banner",
//打开APP查看高清内容
".open_app_bottom",
],
},
{
name: "优酷视频",
url: "youku.com",
items: [
//下载弹窗
".callEnd_box",
//悬浮按钮(主页):打开优酷APP更流畅
".callEnd_fixed_box",
//悬浮按钮:打开优酷APP更流畅
".undefined",
//悬浮按钮:红包
".Corner-container",
],
},
{
name: "爱奇艺",
url: "iqiyi.com/",
items: [
//下载弹窗
".m-iqyGuide-layer",
//打开爱奇艺APP,看精彩视频
"[class^=ChannelHomeBanner]",
//PC端:登录提示上侧
".pl__1",
],
},
{
name: "好看视频",
url: "haokan.baidu.com/",
items: [
//悬浮按钮:打开好看app(中间)
".open-app-top",
//固定文字:打开APP(多)
".top-video-card-img-app",
//固定按钮:下载APP(视频播放时)
".video-player-download-tips",
//固定按钮:打开(底部)
".open-app-bottom",
//固定按钮:打开(底部:个别)
".NewOpenApp",
//PC端固定按钮:下载APP(视频暂停时)
".player-lefttip-inner",
//PC端登录提示:登录提示
"#passport-login-pop",
//PC端登录提示:朦胧背板
".pop-mask",
//PC端登录提示:悬浮提示
".page-top-rightinfo-popover",
],
},
{
name: "m1905电影网",
url: "1905.com/",
items: [
//悬浮弹窗:打开app
"#popupModule",
//悬浮按钮:
".open-link",
],
},
{
name: "百度搜索",
url: "baidu.com",
items: [
//搜索结果:小程序
"[srcid=xcx_multi]",
//搜索结果:百度手机助手
"[srcid=app_mobile_simple]",
//搜索结果:百度手机助手:安全下载
"[srcid=app_mobile_simple_safety]",
//搜索结果:百度应用搜索(IOS)
"[srcid=app_mobile_ios]",
],
},
{
name: "哔哩哔哩",
url: "bilibili.com",
items: [
//悬浮按钮:打开app,看你感兴趣的内容(主页)
".m-home-float-openapp",
//悬浮按钮:打开app(UP主页)
".m-space-float-openapp",
//悬浮按钮:打开app,看高清内容(视频全屏)
".mplayer-widescreen-callapp",
//悬浮按钮:bilibili内打开(底部)
".m-float-openapp",
//悬浮弹窗:bilibili内打开
".openapp-dialog",
//固定按钮:播放时下载
".mplayer-widescreen-callapp",
//PC端:登录提示(右下角)
".lt-row",
//PC端:登录提示(右上角)
".login-panel-popover:has(.login-tip-content)",
//PC端:登录提示(播放器)
".bpx-player-toast-wrap",
//PC端:登录提示(右上角)
"div:has(.unlogin-popover-avatar)",
//PC端:滑动提示(正下方:首次)
".trial-feed-wrap",
],
fun: function () {
let add;
function mutationCallback(record, observer) {
//已确定登录:停止监听
let login = document.querySelector(".header-entry-mini");
if (login) {
observer.disconnect();
}
//已确定未登录:执行函数
let loginBtn = document.querySelector(".header-login-entry");
if (loginBtn) {
if (!add) {
console.log("脚本注入成功");
//添加事件:不拦截
loginBtn.addEventListener("click", function () {
LoginFlag = false;
});
add = true;
}
for (let arr of record) {
for (let node of arr.addedNodes) {
let button;
try {
button = node.querySelector(".bili-mini-close-icon");
} catch (error) {
/* empty */
}
if (button) {
//有登陆弹窗时:模拟点击关闭按钮
if (LoginFlag == true) {
console.log(LoginFlag);
console.log("自动拦截");
button.click();
console.log("恢复播放");
let video = document.querySelector(".bpx-player-video-wrap video");
video.play();
} else {
console.log(LoginFlag);
console.log("手动拦截");
LoginFlag = true;
}
return;
}
}
}
}
}
let observer = new MutationObserver(mutationCallback);
observer.observe(document, { childList: true, subtree: true });
},
},
{
name: "B站专栏",
url: "bilibili.com/read/",
items: [
//悬浮按钮:打开app
"#app>div>bili-open-app.float-btn",
//PC端:登录提示
"div:has(.unlogin-popover-avatar)",
],
},
{
name: "B站笔记",
url: "bilibili.com/opus/",
items: [
//悬浮按钮:打开App,看更多精彩内容
".float-btn",
//悬浮弹窗:打开APP
".openapp-dialog",
//PC端:登录提示
"div:has(.unlogin-popover-avatar)",
],
},
{
name: "西瓜视频",
url: "ixigua.com",
items: [
//打开弹窗:打开
".landing_guide",
//PC端:登录提示
".loginBenefitNotification",
//悬浮按钮:打开西瓜视频,看全网超清视频
".xigua-download",
],
},
{
name: "抖音电脑版",
url: "www.douyin.com",
items: [
//PC端:右下角登录提示(画质)
".login-clarity-new",
//PC端:下方滑动引导
"[data-e2e=recommend-guide-mask]",
//PC端:登陆后查看评论
"#related-video-card-login-guide",
//PC端:底部登录
".wwNZW6za",
],
fun: function () {
//`登陆后查看评论`模糊
addStyle(".sIGPZD5n{filter: none !important}");
addStyle(".uKuFKJ0b{filter: none !important}");
//拦截登录弹窗
onload = function () {
//增加点击事件
let inter = setInterval(() => {
let loginBtn = getXpath('//div[text()="登录"] | //p[text()="登录"]', document).parentElement;
if (loginBtn) {
loginBtn.addEventListener("click", function () {
LoginFlag = false;
});
clearInterval(inter);
}
}, 1000);
};
/**
* Removes a login notice.
*
* @param {MutationRecord[]} mutationsList The mutations list
* @param {MutationObserver} observer The observer
*/
let removeLoginNotice = function (mutationsList) {
for (let mutation of mutationsList) {
for (let node of mutation.addedNodes) {
if (node.nodeType == Node.ELEMENT_NODE) {
let closeBtn = node.querySelector(".dy-account-close");
//关闭登录弹窗
if (closeBtn) {
if (LoginFlag == true) {
closeBtn.click();
} else {
LoginFlag = true;
}
}
return;
}
}
}
};
//执行监听
let observer = new MutationObserver(removeLoginNotice);
observer.observe(document, { childList: true, subtree: true });
},
},
{
name: "丁香园",
url: "3g.dxy.cn",
items: [
//悬浮按钮:APP内打开
"[class^=fixedBtn]",
//悬浮按钮:App内打开(主页)
".wrap",
],
},
{
name: "健康界",
url: "www.cn-healthcare.com/",
items: [
//悬浮按钮:打开(底部滚动)
"footer",
],
},
{
name: "微博",
url: "m.weibo.cn",
items: [
//悬浮按钮:在微博内打开(百度热议)
".app-btn-box",
//悬浮按钮:登录/注册
".login-btn",
//小程序
".wrap",
],
},
{
name: "新浪新闻",
url: "sina.cn/",
items: [
//悬浮按钮:打开APP
".callApp_fl_btn",
],
},
{
name: "新浪财经",
url: "sina.cn/",
items: [
//悬浮弹窗:立即更新(主页:首次访问)
"#SFA_newVersion_pop",
//悬浮按钮:打开App中查看(主页:底部)
".m-client-call2",
//固定按钮:立即登录(主页:资讯)
".login-box",
//悬浮按钮:立即查看(资讯:底部,首次访问)
".wap-msg-bar-wap",
//悬浮按钮:去APP听语音播报(资讯:中间)
".broadcast",
//悬浮按钮:打开APP(资讯:顶部,有bug)
".m-sentiment-blk",
//悬浮按钮:打开APP(资讯:底部)
".m-guss-caijing",
//固定按钮:立即体验(资讯:底部)
"#norm_qrcode_link_auto",
//悬浮按钮:打开APP(子栏1:底部)
"#subPage_bottom_callup_btn",
//悬浮按钮:打开APP(子栏2:底部)
"#__callup_bottom_new",
//悬浮按钮:打开APP(子栏2:顶部,有bug)
".js-app-header",
],
fun: function () {
//修复上述规则产生的bug
let inter = setInterval(() => {
let item = document.querySelector(".compatibility-mode");
if (item.style.marginTop == "0px") {
clearInterval(inter);
} else {
item.style.marginTop = "0px";
}
}, 1000);
},
},
{
name: "东方财富网",
url: "wap.eastmoney.com/",
items: [
//悬浮按钮:打开APP(顶部)
".fixed_top",
//固定按钮:下载(主页:顶部)
"#IndexDT",
//悬浮按钮:打开下载(主页:顶部)
".emwapas_xldt_fixed",
//悬浮按钮:打开APP(主页:底部)
".open-inapp",
],
},
{
name: "东方财富网:股吧",
url: "mguba.eastmoney.com/",
items: [
//悬浮弹窗:打开APP
"#appbox",
//悬浮按钮:东方财富APP内打开(底部)
"#open_app",
],
},
{
name: "电子发烧友",
url: "m.elecfans.com",
items: [
//悬浮按钮:主页右侧
".hm_quick",
//悬浮按钮:登陆/注册
".login-reg-fixed",
//悬浮按钮:上方打开app
".open_app",
],
},
{
name: "人民网",
url: "app.people.cn",
items: [
//悬浮按钮:打开(底部)
".app-bot-wrap",
],
},
{
name: "新京报",
url: "m.bjnews.com.cn/detail/",
items: [
//悬浮按钮:立即打开(顶部)
".xjb-top",
],
},
{
name: "观察者网",
url: "guancha.cn",
items: [
//固定按钮:点击下载(顶部)
".g_header44",
//悬浮按钮:APP专享(底部)
".g_swiper_container",
],
},
{
name: "澎湃新闻",
url: "m.thepaper.cn/newsDetail_forward",
items: [
//悬浮按钮:新闻滚条(底部)
"[class^=index_footer_banner]",
"[.index_footer_banner__Mcr_R]",
],
},
{
name: "凤凰新闻",
url: "ifeng.com",
items: [
//悬浮按钮:立即打开(主页)
"[class^=index_fixSlide_]",
//悬浮按钮:滚动新闻(新闻底部)
"[class^=index_bottom_box_]",
//悬浮按钮:立即打开(财经底部)
"[class^=index_bottomSlide_]",
//悬浮按钮:滚动新闻(卫视底部)
"[class^=index_fixBottom_]",
],
},
{
name: "网易新闻",
url: "3g.163.com",
items: [
//固定按钮:App内打开(底部)
".backflow-floating",
],
},
{
name: "网易新闻",
url: "m.163.com",
items: [
//固定按钮:App内打开(底部)
".backflow-floating",
],
},
{
name: "搜狐",
url: "m.sohu.com/a/",
items: [
//悬浮按钮:打开APP
"#CallAppContainer",
".CallAppContainer",
],
},
{
name: "今日头条移动端:文章",
url: "m.toutiao.com/article/",
items: [
//悬浮按钮:App内打开(底部)
".float-activate-button-container",
".download-bar__container",
],
},
{
name: "今日头条移动端:视频",
url: "m.toutiao.com/article/",
items: [
//悬浮按钮:App内打开(底部)
".float-activate-button-container",
".download-bar__container",
],
},
{
name: "今日头条PC端",
url: "www.toutiao.com/article/",
items: [
//PC端:悬浮弹窗:添加今日头条到电脑桌面
".ttp-message-wrapper",
],
},
{
name: "东方资讯",
url: "mini.eastday.com/nsa/",
items: [
//PC端:悬浮弹窗:添加到桌面
"#dftt-message-wrapper",
],
},
{
name: "虎嗅",
url: "m.huxiu.com",
items: [
//悬浮按钮:go!(主页)
".guide-wrap",
//悬浮按钮:打开(顶部)
".js-top-fixed",
//悬浮按钮:打开(底部)
".bottom-open-app-btn",
],
},
{
name: "虎扑",
url: "m.hupu.com",
items: [
//悬浮按钮:App内打开
".open-hupu",
],
},
{
name: "豆瓣",
url: "m.douban.com",
items: [
//固定按钮:用App打开(电影详情页)
".subject-banner",
//悬浮按钮:豆瓣APP内打开
".talion-nav-footer",
],
},
{
name: "太平洋电脑",
url: "g.pconline.com.cn",
items: [
//悬浮按钮:打开app(底部)
".btnForAppOpenImg",
//悬浮按钮:打开知科技App
".btnForAppOpenA",
//固定按钮:立即打开(底部)
".WakeUptop",
//悬浮按钮:打开(底部)
".page-float-box",
],
},
{
name: "中关村在线",
url: "m.zol.com.cn",
items: [
//悬浮按钮:打开APP
".cover-back_s",
//悬浮按钮:APP内打开
"#bottom-fixed-wrapper > span",
],
},
{
name: "中关村在线2(报价+论坛)",
url: "wap.zol.com.cn",
items: [
//悬浮按钮:打开APP
".cover-back_s",
//悬浮按钮:APP内打开
"#bottom-fixed-wrapper > span",
],
},
{
name: "汽车之家PC版",
url: "www.autohome.com.cn",
items: [
//悬浮按钮:登录提示(PC端)
"#loginGuide",
],
},
{
name: "汽车之家移动版",
url: "m.autohome.com.cn",
items: [
//悬浮按钮: App内打开
"#float_new_button",
],
},
{
name: "太平洋汽车",
url: "m.pcauto.com.cn/",
items: [
//悬浮弹窗: App内打开
"#home-bottom-half-dialog",
//悬浮按钮: 轮播评论
"#dmListOuter",
],
},
{
//www.taptap.com
name: "taptap",
url: "www.taptap.cn",
items: [
//悬浮按钮:打开taptap
".open-app-global-float",
],
},
{
//m.taptap.com
name: "taptap",
url: "m.taptap.cn",
items: [
//悬浮按钮:打开taptap查看更多精彩内容
".app-download__wrapper",
//苹果端:悬浮按钮:添加到桌面
".show-add-to-screen",
//苹果端:固定按钮:添加到桌面
".add-to-screen-wrap",
],
},
{
//https://m.ithome.com/
name: "it之家",
url: "m.ithome.com",
items: [
//固定按钮(底部):立即打开
".open-app-banner",
],
},
{
name: "360docPC版",
url: "www.360doc.com/content/",
items: [
//登录弹窗
"iframe",
//登录弹窗:朦胧模板
"iframe~div",
],
},
{
name: "开源中国",
url: "www.oschina.net",
items: [
//悬浮按钮(底部):立即打开
".app-download-banner-box",
],
},
{
name: "segmentfault思否",
url: "segmentfault.com/q",
items: [
//登录弹窗
".modal-dialog-centered",
],
},
{
name: "阿里云开发者社区",
url: "developer.aliyun.com/article/",
items: [
//阿里云App内打开
".app-fixed-btn",
],
},
{
name: "华为云开发者社区",
url: "huaweicloud.csdn.net/",
items: [
//加入社区
".user-desc-fix",
],
},
{
//https://m.36kr.com/p/1964588951470856
name: "36氪",
url: "m.36kr.com/p/",
items: [
//悬浮按钮(顶部):打开
".article-top-swiper-goapp",
],
},
{
name: "雪球",
url: "xueqiu.com/",
items: [
//悬浮按钮:加群学习(主页)
".FloatDownloadButton_mobile_xiaoxue-button_1jZ",
//悬浮按钮:加群学习(文章)
".index_xiaoxue-button_1Av",
],
fun: function () {
//悬浮按钮:打开app(话题)
document.onreadystatechange = function () {
if (document.readyState === "complete") {
document.querySelector("[class^=FloatDownloadButton_mobile_openapp__fix_]").remove();
}
};
/**
* Removes a login notice.
*
* @param {MutationRecord[]} mutationsList The mutations list
* @param {MutationObserver} observer The observer
*/
let removeLoginNotice = function (mutationsList) {
for (let mutation of mutationsList) {
for (let node of mutation.addedNodes) {
let closeBtn = document.querySelector(".modal__login .close");