-
Notifications
You must be signed in to change notification settings - Fork 166
/
MyNovelReader.user.js
executable file
·6937 lines (6244 loc) · 303 KB
/
MyNovelReader.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==
// @id mynovelreader@[email protected]
// @name My Novel Reader
// @name:zh-CN 小说阅读脚本
// @name:zh-TW 小說閱讀腳本
// @version 6.5.1
// @namespace https://github.com/ywzhaiqi
// @author ywzhaiqi
// @contributor Roger Au, shyangs, JixunMoe、akiba9527 及其他网友
// @description 小说阅读脚本,统一阅读样式,内容去广告、修正拼音字、段落整理,自动下一页
// @description:zh-CN 小说阅读脚本,统一阅读样式,内容去广告、修正拼音字、段落整理,自动下一页
// @description:zh-TW 小說閱讀腳本,統一閱讀樣式,內容去廣告、修正拼音字、段落整理,自動下一頁
// @license GPL version 3
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_getResourceURL
// @grant GM_openInTab
// @grant GM_setClipboard
// @grant GM_registerMenuCommand
// @grant GM_info
// @grant unsafeWindow
// @homepageURL https://greasyfork.org/scripts/292/
// @require https://cdn.staticfile.org/vue/2.2.6/vue.min.js
// @require https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js
// @require https://cdn.staticfile.org/underscore.js/1.7.0/underscore-min.js
// @require https://cdn.staticfile.org/keymaster/1.6.1/keymaster.min.js
// @require https://greasyfork.org/scripts/2672-meihua-cn2tw/code/Meihua_cn2tw.js?version=7375
// @connect www.qidian.com
// @include https://www.qidian.com/chapter/*
// @include *://read.qidian.com/*,*.aspx
// @include *://readbook.qidian.com/bookreader/*,*.html
// @include *://read.qidian.com/BookReaderOld/*,*.aspx
// @include *://read.qidian.com/BookReader/*,*.aspx
// @exclude http://read.qidian.com/BookReader/vol,*,*.aspx
// @include *://wwwploy.qidian.com/BookReader/*,*.aspx
// @include *://free.qidian.com/Free/ReadChapter.aspx?*
// @include *://vipreader.qidian.com/chapter/*/*
// @include *://www.qdmm.com/BookReader/*,*.aspx
// @include *://www.qdwenxue.com/BookReader/*,*.aspx
// @include *://chuangshi.qq.com/read/bookreader/*.html*
// @include *://chuangshi.qq.com/*bk/*/*-r-*.html*
// @include *://yunqi.qq.com/*bk/*/*.html
// @include *://dushu.qq.com/read.html?bid=*
// @include *://www.jjwxc.net/onebook.php?novelid=*
// @include *://my.jjwxc.net/onebook_vip.php?novelid=*&chapterid=*
// @include *://book.zongheng.com/chapter/*/*.html
// @include *://www.xxsy.net/chapter/*.html
// @include *://book.zhulang.com/*/*.html
// @include *://www.17k.com/chapter/*/*.html
// @include *://mm.17k.com/chapter/*/*.html
// @include *://www.kanxia.net/k/*/*/*.html
// @include *://www.qingdi.com/files/article/html/*/*/*.html
// @include *://www.xkzw.org/*/*.html
// @include *://shouda8.com/*/*.html
// @include *://novel.hongxiu.com/*/*/*.shtml
// @include *://www.readnovel.com/novel/*.html
// http://www.tianyabook.com/*/*.htm
// @include *://tieba.baidu.com/p/*
// @include *://booklink.me/*
// @include *://2.booklink.me/*
// booklink.me
// @include *://www.shumil.co/*/*.html
// @include *://www.wcxiaoshuo.com/wcxs-*-*/
// @include *://www.xiaoshuoz.com/wcxs-*-*/
// @include *://www.quledu.com/wcxs-*-*/
// @include *://www.ranwen.cc/*/*/*/*.html
// @include *://www.ranwen.net/files/article/*/*/*.html
// @include *://www.ranwena.com/files/article/*/*/*.html
// @include *://www.64mi.com/*/*/*/*.html
// @include *://www.bxs.cc/*/*.html*
// @include *://www.laishuwu.com/html/*/*/*.html
// @include *://www.binhuo.com/html/*/*/*.html
// @include *://www.haoqi99.com/haoqi99/*/*/*.shtml
// @include *://www.shuhe.cc/*/*/
// @include *://www.dudukan.net/html/*/*/*.html
// @include *://www.hahawx.com/*/*/*.htm
// @include *://www.zhuzhudao.com/txt/*/*/
// @include *://www.zhuzhudao.cc/txt/*/*/
// @include *://www.dahaomen.net/txt/*/*/
// @include *://www.tadu.com/book/*/*/
// @exclude *://www.tadu.com/book/*/toc/
// @include *://www.aishoucang.com/*/*.html
// @include *://www.wanshuba.com/Html/*/*/*.html
// @include *://www.zhuishu.net/files/article/html/*/*/*.html
// @include *://www.sqsxs.com/*/*/*.html*
// @include *://www.caiwei.tw/html/*/*.html
// @include *://www.hotsk.com/Html/Book/*/*/*.shtml
// @include *://www.92to.com/*/*/*.html
// @include *://www.qirexs.com/read-*-chapter-*.html
// @include *://www.du00.com/read/*/*/*.html
// @include *://www.qishuwu.com/*/*/
// @include *://www.wandoou.com/book/*/*.html
// @include *://www.6yzw.org/*/*.html
// @include *://www.6yzw.com/*/*.html
// @include *://www.daomengren.com/*/*.html
// @include *://muyuge.com/*/*.html
// @include *://www.muyuge.net/*/*.html
// @include *://bbs.vyming.com/novel-read-*-*.html
// @include *://www.9imw.com/novel-read-*-*.html
// @include *://www.23zw.com/olread/*/*/*.html
// @include *://www.50zw.com/book_*/*.html
// @include *://www.xiangcunxiaoshuo.com/shu/*/*.html
// @include *://www.lwxs520.com/books/*/*/*.html
// @include *://m.lwxs520.com/books/*/*/*.html
// @include *://www.lwxiaoshuo.com/*/*/*.html
// @include *://www.zashu.net/books/*/*/*.html
// @include *://www.yunlaige.com/html/*/*/*.html
// @include *://www.cfwx.net/files/article/html/*/*/*.html
// @include *://www.qiuwu.net/html/*/*/*.html
// @include *://www.fengwu.org/html/*/*/*.html
// @include *://www.wenxue8.org/html/*/*/*.html
// @include *://www.xs84.com/*_*/*
// @include *://www.geiliwx.com/GeiLi/*/*/*.shtml*
// @include *://www.123yq.com/read/*/*/*.shtml
// @include *://www.123yq.org/read/*/*/*.shtml
// @include *://www.dhzw.com/book/*/*/*.html
// *://www.du00.cc/read/*/*/*.html
// @include *://www.aszw.com/book/*/*/*.html
// @include *://www.xsbashi.com/*_*/
// @include *://www.vodtw.com/Html/Book/*/*/*.html
// @include *://www.fhxs.com/read/*/*/*.shtml
// @include *://www.snwx.com/book/*/*/*.html
// www.sodu.so
// @include *://www.jiaodu8.com/*/*/*/*.html
// @include *://www.fktxt.com/book/*/*.html
// @include *://www.186s.cn/files/article/html/*/*/*.html
// @include *://www.6xs.cn/xs/*/*/*.html
// @include *://www.chaojiqiangbing.com/book/*/*/*.html
// @include *://book.moka123.com/book/*/*/*.html
// @include *://www.suimeng.com/files/article/html/*/*/*.html
// @include *://www.hao662.com/haoshu/*/*/*.html
//www.verydu.net
// http://www.yawen8.com/*/*/*.html
// @include *://www.tsxs.cc/files/article/html/*/*/*.html
// @include *://www.ziyuge.com/*/*/*/*/*.html
// 其它网站
// @include *://book.sfacg.com/Novel/*/*/*/
// @include *://www.7dsw.com/book/*/*/*.html
// @include *://www.d586.com/*/*/
// @include *://www.bookgew.com/Html/Book/*/*/*.htm
// @include *://read.shuhaha.com/Html/Book/*/*/*.html
// @include *://www.shuhaha.com/Html/Book/*/*/*.html
// @include *://www.biqi.me/files/article/html/*/*/*.html
// @include *://www.ttzw.com/book/*/*.html
// @include *://www.uukanshu.com/*/*/*.html
// @include *://www.uukanshu.net/*/*/*.html
// @include *://www.173ed.com/read/*/*.html
// @include *://www.a240.com/read/*/*.html
// @include *://www.zhuishu.com/*/*.html
// @include *://www.shuangde.cc/*/*.html
// @include *://www.shenmaxiaoshuo.com/ml-*-*/
// @include *://www.86kankan.com/read/*/*.html
// @include *://www.fkzww.com/*/*/*.shtml
// @include *://www.151kan.com/*/*/*/*.html
// @include *://www.bookabc.net/*/*/*.html
// @include *://www.xshuotxt.com/*/*/*/*.html
// @include *://www.doulaidu.com/*/*/*.html
// @include *://www.d586.com/*/*/
// @include *://www.kanshu.la/book/*/*html
// @include *://www.wtcxs.com/files/article/html/*/*/*.html
// @include *://www.5du5.com/book/*/*/*.html
// @include *://book.kanunu.org/*/*/*.html
// @include *://www.kanunu8.com/book*/*.html
// @include *://paitxt.com/*/*/*.html
// @include *://www.shunong.com/yuedu/*/*/*.html
// @include *://book.yayacms.com/*/book_*_*.html
// @include *://www.yqhhy.cc/*/*/*.html
// @include *://www.nuoqiu.com/static/*/*.html
// @include *://www.17yue.com/*/*/*.html
// @include *://dukeba.com/book/*/*/*.shtml
// @include *://www.wenchangshuyuan.com/html/*/*/*.html
// @include *://www.pofeng.net/xiaoshuo/*/*.html
// @include *://www.epzww.com/book/*/*
// @include *://*.xiaoshuokan.com/haokan/*/*.html
// @include *://www.wobudu.com/*/*.html
// @include *://www.qb5.com/xiaoshuo/*/*/*.html
// @include *://www.x23us.com/html/*/*/*.html
// @include *://www.23us.com/html/*/*/*.html
// @include *://www.23us.cc/html/*/*/*.html
// @include *://www.23wx.com/html/*/*/*.html
// @include *://www.xs222.com/html/*/*/*.html
// @include *://www.bixiage.com/*/*/*/*.html
// @include *://www.ranwenxiaoshuo.com/files/article/html/*/*/*.html
// @include *://www.ranwenxiaoshuo.com/*/*-*-*.html
// @include *://www.bjxiaoshuo.com/bjxs-*-*/
// @include *://www.59shuku.com/xiaoshuo/*/*.htm
// @include *://www.16kbook.org/Html/Book/*/*/*.shtml
// @include *://www.dixiaoshuo.com/Html/*/*.html
// @include *://www.nieshu.com/Book/*/*/*.shtml
// @include *://www.tlxsw.com/files/article/html/*/*/*.html
// @include *://www.1kanshu.com/files/article/html/*/*/*.html
// @include *://www.uutxt.org/book/*/*/*.html
// @include *://www.5800.cc/*/*/*/*.html
// @include *://www.biquge.com/*/*.html
// @include *://www.biqudu.com/*/*.html
// @include *://www.biquge.la/book/*/*.html
// @include *://www.biquge.com.tw/*/*.html
// @include *://www.biquge.tw/*_*/*.html
// @include *://www.biquge.tv/*/*.html
// @include *://www.biquge5200.com/*/*.html
// @include *://www.biqugezw.com/*/*.html
// @include *://www.bequgezw.com/*/*/*.html
// @include *://www.biquzi.com/*_*/*.html
// @include *://www.biquge.cc/html/*/*/*.html
// @include *://www.biqubao.com/book/*/*.html
// @include *://www.biquwu.cc/biquge/*/*.html
// @include *://www.qududu.com/book/*/*/*.html
// @include *://www.free97.cn/book/*/*/*.html
// @include *://www.122s.com/book/*/*.html
// @include *://www.123du.net/dudu-*/*/*.html
// @include *://www.123du.cc/dudu-*/*/*.html
// @include *://www.123du.net/book/*/*.html
// @include *://www.hwafa.com/*/*.html
// @include *://www.qmshu.com/html/*/*/*.html
// @include *://dlzw.cc/article-*-*.html
// @include *://www.shushu5.com/read/*/*.html
// @include *://www.xiaoyanwenxue.com/files/article/html/*/*/*.html
// @include *://www.3gsc.com.cn/bookcon/*_*_*
// @include *://www.bj-ibook.cn/book/*/*/*.htm
// @include *://www.baoliny.com/*/*.html
// @include *://www.dajiadu.net/files/article/html/*/*/*.html
// @include *://www.yankuai.com/files/article/html/*/*/*.html
// @include *://www.docin.net/*/*.html
// @include *://www.dushuge.net/html/*/*/*.html
// @include *://www.xunshu.org/xunshu/*/*/*.html
// @include *://www.moneyren.com/book/*/*/*.shtml
// @include *://wemaxfilipino.com/*/*/*.html
// @include *://www.85618892.cn/xiaoshuo/*/*/*.shtml
// @include *://www.bookba.net/Html/Book/*/*/*.html
// @include *://www.moksos.com/*/*/*.html
// @include *://dudu8.net/novel/*/*/*.html
// @include *://www.dawenxue.net/html/*/*/*.html
// @include *://www.yanmoxuan.org/book/*/*/*.html
// @include *://www.duyidu.com/xiaoshuo/*/*/*.html
// @include *://www.69zw.com/xiaoshuo/*/*/*.html
// @include *://www.kan7.com/xiaoshuo/*/*/*.html
// @include *://www.laishu.com/book/*/*/*.shtml
// @include *://www.bxwx.org/b/*/*/*.html
// @include *://www.bxzw.org/*/*/*/*.shtml
// @include *://www.360118.com/html/*/*/*.html
// @include *://www.59to.com/files/article/xiaoshuo/*/*/*.html
// @include *://www.dyzww.com/cn/*/*/*.html
// @include *://www.9wh.net/*/*/*.html
// @include *://www.luoqiu.net/html/*/*/*.html
// @include *://www.luoqiu.com/html/*/*/*.html
// @include *://www.epzw.com/files/article/html/*/*/*.html
// @include *://www.dashubao.co/book/*/*/*.html
// @include *://b.faloo.com/p/*/*.html
// @include *://www.baikv.com/*/*.html
// @include *://www.66721.com/*/*/*.html
// @include *://www.3dllc.com/html/*/*/*.html
// @include *://www.xstxt.com/*/*/
// @include *://www.zzzcn.com/3z*/*/
// @include *://www.zzzcn.com/modules/article/App.php*
// @include *://www.nilongdao.com/book/*/*/*.html
// @include *://xs321.net/*/*/
// @include *://read.guanhuaju.com/files/article/html/*/*/*.html
// @include *://www.book108.com/*/*/*.html
// @include *://5ycn.com/*/*/*.html
// @include *://www.zhaoxiaoshuo.com/chapter-*-*-*/
// @include *://*zbzw.com/*/*.html
// @include *://manghuangji.cc/*/*.html
// @include *://www.aiqis.com/*/*.html
// @include *://www.fftxt.net/book/*/*.html
// @include *://www.5kwx.com/book/*/*/*.html
// @include *://www.uuxiaoshuo.net/html/*/*/*.html
// @include *://www.sanyyo.org/*.html
// @include *://www.chinaisbn.com/*/*/*.html
// @include *://www.caihongwenxue.com/Html/Book/*/*/*.html
// @include *://www.shushuw.cn/shu/*/*.html
// @include *://www.78xs.com/article/*/*/*.shtml
// @include *://www.woaixiaoshuo.com/xiaoshuo/*/*/*.html
// @include *://www.ty2016.com/book/*/*.html
// @include *://wx.ty2016.com/*/*/*.html
// @include *://www.my285.com/*/*/*/*.htm
// @include *://www.5858xs.com/html/*/*/*.html
// @include *://book.58xs.com/html/*/*/*.html
// @include *://book.mihua.net/*/*/*/*.html
// @include *://www.hjwzw.com/Book/Read/*,*
// @include *://www.hjwzw.com/Book/Read/*_*
// @include *://www.365essay.com/*/*.htm
// @include *://www.gengxin8.com/read/*/*.html
// @include *://www.365xs.org/books/*/*/*.html
// @include *://www.wuruo.com/files/article/html/*/*/*.html
// @include *://*.8shuw.net/book/*/*.html
// @include *://www.pashuw.com/BookReader/*/*.html
// @include *://read.shanwen.com/html/*/*/*.html
// @include *://www.qqxs.cc/xs/*/*/*.html
// @include *://www.69shu.com/txt/*/*
// @include *://www.e8zw.com/book/*/*/*.html
// @include *://www.8535.org/*/*/*.html*
// @include *://www.yfzww.com/books/*/*/*.htm
// @include *://www.lewen8.com/lw*/*.html
// @include *://www.pinwenba.com/read/*/*.html
// @include *://down1.qidian.com/bookall/*.htm*
// @include *://www.77nt.com/*/*.html
// @include *://www.quanbenba.com/yuedu/*/*/*.html
// @include *://www.sto.cc/book-*-*.html
// @include *://www.151xs.com/wuxiazuoxiong/*/chapter/*/
// @include *://www.qududu.net/book/*/*/*.html
// @include *://www.qingdou.cc/chapter*
// @include *://www.shuyuewu.com/kan*
// @include *://www.1553.net/*/*
// @include *://www.269s.com/*/*/*
// @include *://www.33yq.com/read/*/*/*.shtml
// @include *://233yq.com/xiaoshuo/*.html
// @include *://www.50zw.co/book_*/*.html
// @include *://www.bqg5200.com/xiaoshuo/*/*/*.html
// @include *://www.biquge5200.cc/*/*.html
// @include *://www.50zw.la/book_*/*.html
// @include *://www.qu.la/book/*/*.html
// @include *://m.qu.la/book/*/*.html
// @include *://www.luoqiu.com/read/*/*.html
// @include *://www.54tushu.com/book_library/chaptershow/theId/*.html
// @include *://www.snwx8.com/book/*/*/*.html
// @include *://read.qidian.com/chapter/*
// @include *://www.23zw.me/olread/*/*/*.html
// @include *://www.ptwxz.com/html/*/*/*.html
// @include *://www.dhzw.org/book/*/*/*.html
// @include *://www.biqiuge.com/book/*/*.html
// @include *://www.baquge.com/files/article/html/*/*/*.html
// @include *://www.baquge.tw/files/article/html/*/*/*.html
// @include *://www.bxwx9.org/b/*/*/*.html
// @include *://www.miaobige.com/*/*/*.html
// @include *://www.52dsm.com/chapter/*/*.html
// @include *://www.banfusheng.com/chapter/*/*.html
// @include *://www.remenxs.com/du_*/*/
// @include *://www.shuhai.com/read/*/*.html
// @include *://www.hbooker.com/chapter/*
// @include *://www.mht.la/*/*/*.html
// @include *://www.paomov.com/*/*/*.html
// @include *://www.moyuanwenxue.com/xiaoshuo/*/*/*.htm
// @include *://www.ggdown.com/modules/article/reader.php?aid=*
// @include *://www.daizhuzai.com/*/*.html
// @include *://www.mywenxue.com/xiaoshuo/*/*/*.htm
// @include *://www.yueduyue.com/*/*.html
// @include *://www.67shu.com/*/*/*.html
// @include *://www.wangshu.la/books/*/*/*.html
// @include *://www.23sw.net/*/*/*.html
// @include *://www.ybdu.com/xiaoshuo/*/*/*.html
// @include *://www.shudaizi.org/book/*/*.html
// @include *://www.ymoxuan.com/book/*/*/*.html
// @include *://www.67shu.com/*/*/*.html
// @include *://www.bookxuan.com/*/*.html
// @include *://www.2kxs.com/xiaoshuo/*/*.html
// @include *://www.88dushu.com/xiaoshuo/*/*/*.html
// @include *://www.wutuxs.com/html/*/*/*.html
// @include *://www.23qb.com/book/*/*.html
// @include *://www.biqu6.com/*/*.html
// @include *://www.niepo.net/html/*/*/*.html
// @include *://www.booktxt.net/*/*.html
// @include *://www.booktxt.com/*/*.html
// @include *://www.aszw.org/book/*/*/*.html
// @include *://www.xiashu.cc/*/*.html
// @include *://www.lewenxiaoshuo.com/books/*/*.html
// @include *://www.heihei66.com/*/*/*.html
// @include *://www.111bz.net/*/*.html
// @include *://www.biqukan.com/*_*/*.html
// @include *://www.4xiaoshuo.com/*/*/*.html
// @include *://www.woquge.com/*/*.html
// @include *://www.lianzaishu.com/*/*.html
// @include *://www.lucifer-club.com/chapter-*-*.html
// @include *://www.011bz.com/*/*.html
// @include *://www.quanben.io/*/*/*.html
// @include *://www.b5200.org/*/*.html
// @include *://www.b5200.net/*/*.html
// @include *://www.cangqionglongqi.com/*/*.html
// @include *://www.daocaorenshuwu.com/book/*/*.html
// @include https://xhhread.com/read/read*.jhtml?chapterid=*
// @include *://www.shubao4.com/read/*/*.html
// @include *://www.gxwztv.com/*/*/*.html
// @include *://novel.tingroom.com/*/*/*.html
// @include *://www.xxbiquge.com/*/*.html
// @include *://www.liewen.cc/b/*/*/*.html
// @include *://www.pbtxt.com/*/*.html
// @include *://www.dingdiann.com/*/*.html
// @include *://www.uctxt.com/book/*/*/*.html
// @include *://www.mytxt.cc/read/*/*.html
// @include *://yd.baidu.com/view/*?cn=*
// @include *://www.88dus.com/xiaoshuo/*/*/*.html
// @include *://m.yushuwu.com/novel/*/*.html
// @include *://www.sbkk88.com/*/*/*.html
// @include *://www.ciweimao.com/chapter/*
// @include *://www.xinshubao.net/*/*/*.html
// @include *://www.okdd.net/html/*/*/*.shtml
// @include *://www.aixs.org/xs/*/*/*.html
// @include *://www.kayege.com/book/*/*.html
// @include *://m.zwduxs.com/*_*/*.html
// @include *://www.23us.la/html/*/*/*.html
// @include *://www.shuyaya.cc/read/*/*.html
// @include *://www.58xs.tw/html/*/*/*.html
// @include *://www.xbiquge.cc/book/*/*.html
// @include *://www.pengchang-cn.com/*/*/*.html
// @include *://www.555zw.com/book/*/*/*.html
// @include *://www.69shu.la/69shu/*/*/*.html
// @include *://www.biqux.com/*/*.html
// @include *://houweidong.com/*.html
// @include *://book.janpn.com/book/*/*/*.html
// @include *://www.xs52.com/xiaoshuo/*/*/*.html
// @include *://www.88106.com/book/*/*/*.html
// @include *://www.luoxia.com/hch/*.htm
// @include *://www.lianzaishu.com/*/*.html
// @include *://www.juhezw.com/read/*/*.html
// @include *://www.ranwen.la/files/article/*/*/*.html
// @include *://www.zhaishuyuan.com/chapter/*/*
// @include *://www.ciymao.com/chapter/*/*.html
// @include *://www.3xs.cc/*/*.html
// @include *://www.nuanyuehanxing.com/*/*/*.html
// @include *://xrzww.com/module/novel/read.php*
// @include *://www.wanbentxt.com/*/*.html
// @include *://www.9txs.com/book/*/*.html
// @include *://www.35xs.co/book/*/*.html
// include *://www.gongzicp.com/read-*.html
// 未完成
// @include *://www.alfagame.net/chapter_www.html?1*
// 移动版
// @include *://wap.yc.ireader.com.cn/book/*/*/
// @include *://m.jjwxc.net/book2/*/*
// @include *://m.jjwxc.com/book2/*/*
// @include *://wap.jjwxc.net/book2/*/*
// @include *://wap.jjwxc.com/book2/*/*
// @include *://wap.jjwxc.com/vip/*/*?ctime=*
// @include *://wap.jjwxc.com/vip/*/*
// @include *://wap.jjwxc.net/vip/*/*
// @include *://m.jjwxc.net/vip/*/*
// @include *://m.jjwxc.com/vip/*/*
// @exclude */List.htm
// @exclude */List.html
// @exclude */List.shtml
// @exclude */index.htm
// @exclude */index.html
// @exclude */index.shtml
// @exclude */Default.htm
// @exclude */Default.html
// @exclude */Default.shtml
// @run-at document-start
// ==/UserScript==
/* This script build by rollup. */
(function (Vue) {
'use strict';
function __$styleInject ( css ) {
if(!css) return ;
if(typeof(window) == 'undefined') return ;
let style = document.createElement('style');
style.setAttribute('media', 'screen');
style.setAttribute('class', 'noRemove');
style.innerHTML = css;
document.head.appendChild(style);
return css;
}
Vue = Vue && Object.prototype.hasOwnProperty.call(Vue, 'default') ? Vue['default'] : Vue;
// fix 起点 console 定时清理。Tampermonkey 无效,ScriptCat 有效
console.clear = () => {};
// 其它设置
const config = {
lang: 'zh-CN',
soduso: false, // www.sodu.so 跳转
// content_replacements: true, // 小说屏蔽字修复
fixImageFloats: true, // 图片居中修正
paragraphBlank: true, // 统一段落开头的空格为 2个全角空格
end_color: "#666666", // 最后一页的链接颜色
PRELOADER: true, // 提前预读下一页
xhr_time: 15 * 1000,
download_delay: 0, // 毫秒。0 毫秒下载起点 vip 限时免费章节会被封
dumpContentMinLength: 3, // 检测重复内容的最小行数
};
var uiTrans = {
"将小说网页文本转换为繁体。\n\n注意:内置的繁简转换表,只收录了简单的单字转换,启用本功能后,如有错误转换的情形,请利用脚本的自订字词取代规则来修正。\n例如:「千里之外」,会错误转换成「千里之外」,你可以加入规则「千里之外=千里之外」来自行修正。": "將小說網頁文字轉換為繁體。\n\n注意:內建的繁簡轉換表,只收錄了簡單的單字轉換,啟用本功能後,如有錯誤轉換的情形,請利用腳本的自訂字詞取代規則來修正。\n例如:「千里之外」,會錯誤轉換成「千裡之外」,你可以加入規則「千裡之外=千里之外」來自行修正。",
"图片章节用夜间模式没法看,这个选项在启动时会自动切换到缺省皮肤": "圖片章節無法以夜間模式觀看,這個選項在啟動時會自動切換到預設佈景",
"通过快捷键切换或在 Greasemonkey 用户脚本命令处打开设置窗口": "通過熱鍵切換或在 Greasemonkey 使用者腳本命令處開啟設定視窗",
"隐藏后通过快捷键或 Greasemonkey 用户脚本命令处调用": "隱藏後通過熱鍵或 Greasemonkey 使用者腳本命令處調用",
"一行一个,每行第一个 = 为分隔符\n需要刷新页面生效": "一行一條規則,每一行第一個 = 為分隔符\n(需重新載入頁面才能生效)",
"错误:没有找到下一页的内容,使用右键翻到下一页": "錯誤:沒有找到下一頁的內容,使用右鍵翻到下一頁",
"左键滚动,中键打开链接(无阅读模式)": "左鍵捲動畫面至該章節,中鍵開啟連結(無閱讀模式)",
"请输入切换左侧章节列表的快捷键:": "請輸入切換左側章節列表的熱鍵:",
"详见脚本代码的 Rule.specialSite": "詳見腳本代碼的 Rule.specialSite",
"booklink.me 点击的网站强制启用": "booklink.me 點擊的網站強制啟用",
"部分选项需要刷新页面才能生效": "部份選項需重新載入頁面才能生效",
"取消本次设定,所有选项还原": "取消本次設定,所有選項還原",
"不影响 booklink.me 的启用": "不影響 booklink.me 的啟用",
"请输入打开设置的快捷键:": "請輸入開啟設定視窗的熱鍵:",
"微软雅黑,宋体,黑体,楷体": "Microsoft YaHei,新細明體,PMingLiU,MingLiU,細明體,標楷體",
"夜间模式的图片章节检测": "夜間模式的圖片章節檢測",
"点击显示隐藏章节列表": "點此以顯示或隱藏章節列表",
"添加下一页到历史记录": "加入下一頁到歷史記錄",
"booklink 自动启用": "booklink 自動啟用",
"Enter 键打开目录": "Enter 鍵開啟目錄",
"隐藏左侧章节列表": "隱藏左側章節列表",
"小说阅读脚本设置":"小說閱讀腳本設定",
"已到达最后一页": "已到達最後一頁",
"正在载入下一页": "正在載入下一頁",
"通过快捷键切换": "通過熱鍵切換",
"隐藏底部导航栏": "隱藏底部導航列",
"隐藏左侧导航条": "隱藏左側章節列表彈出鈕",
"主页链接没有找到": "未找到主頁連結",
"自定义站点规则": "自訂網站規則",
"自定义替换规则": "自訂字詞取代規則",
"网页:转繁体": "網頁:轉繁體",
"双击暂停翻页": "雙擊暫停翻頁",
"隐藏设置按钮": "隱藏設定按鈕",
"强制手动启用": "強制手動啟用",
"调用阅读器": "調用閱讀器",
"自定义样式": "自訂樣式",
"界面语言": "介面語言",
"打开目录": "開啟本書目錄頁",
"自动翻页": "自動翻頁",
"缺省皮肤": "預設佈景",
"暗色皮肤": "暗色佈景",
"夜间模式": "夜間模式",
"夜间模式1": "夜間模式1",
"夜间模式2": "夜間模式2",
"橙色背景": "橙色背景",
"绿色背景": "綠色背景",
"绿色背景2": "綠色背景2",
"蓝色背景": "藍色背景",
"棕黄背景": "棕黃背景",
"经典皮肤": "經典背景",
"阅读模式": "閱讀模式",
"调试模式": "偵錯模式",
"反馈地址": "反饋與討論",
"安静模式": "安靜模式",
"√ 确认": "√ 確定",
"X 取消": "X 取消",
"上一页": "上一頁",
"下一页": "下一頁",
"状态": "狀態",
"已经": "已經",
"暂停": "暫停",
"启用": "啟用",
"退出": "離開",
"测试": "測試",
"距离": "距離",
"加载": "載入",
"字体": "字型",
"行高": "行距",
"行宽": "版面寬度",
"目录": "目錄"
};
if(!String.prototype.uiTrans){
Object.defineProperty(String.prototype, 'uiTrans', {
value: function(){
var _this = this.valueOf(), key, regexp;
if(config.lang !== 'zh-TW') return _this;
if(uiTrans.hasOwnProperty(_this)) return uiTrans[_this];
for (key in uiTrans) {
regexp = new RegExp(key, 'g');
_this = _this.replace(regexp, uiTrans[key]);
}
return _this;
},
enumerable: false
});
}
// 参考 https://github.com/madrobby/zepto/blob/master/src/detect.js
const ua = navigator.userAgent;
const platform = navigator.platform;
const isFirefox = ua.match(/Firefox\/([\d.]+)/);
const isChrome = ua.match(/Chrome\/([\d.]+)/) || ua.match(/CriOS\/([\d.]+)/);
const isWindows = /Win\d{2}|Windows/.test(platform);
//------------------- 辅助函数 ----------------------------------------
var nullFn = function() {};
// @require https://greasyfork.org/scripts/2599-gm-2-port-function-override-helper/code/GM%202%20port%20-%20Function%20Override%20Helper.js?version=184155
// Check if is GM 2.x
if (typeof window.exportFunction == 'undefined') {
// For GM 1.x backward compatibility, should work.
window.exportFunction = (function(foo, scope, defAs) {
scope[defAs.defineAs] = foo;
}).bind(unsafeWindow);
}
var C;
function toggleConsole(debug) {
if (debug) {
C = console;
} else {
C = {
log: nullFn,
debug: nullFn,
error: nullFn,
group: nullFn,
groupCollapsed: nullFn,
groupEnd: nullFn,
time: nullFn,
timeEnd: nullFn,
};
}
}
function L_getValue(key) { // 个别用户禁用本地存储会报错
try {
return localStorage.getItem(key);
} catch (e) {}
}
function L_setValue(key, value) {
try {
localStorage.setItem(key, value);
} catch (e) {}
}
function L_removeValue(key) {
try {
localStorage.removeItem(key);
} catch (e) {}
}
function parseHTML(str) {
var doc;
try {
// firefox and chrome 30+,Opera 12 会报错
doc = new DOMParser().parseFromString(str, "text/html");
} catch (ex) {}
if (!doc) {
doc = document.implementation.createHTMLDocument("");
doc.querySelector("html").innerHTML = str;
}
return doc;
}
function toRE(obj, flag) {
if (obj instanceof RegExp) {
return obj;
} else {
return new RegExp(obj, (flag || 'ig'));
}
}
function toReStr(str) { // 处理字符串,否则可能会无法用正则替换
return str.replace(/[()\[\]{}|+.,^$?\\*]/g, "\\$&");
}
function wildcardToRegExpStr(urlstr) {
if (urlstr.source) return urlstr.source;
var reg = urlstr.replace(/[()\[\]{}|+.,^$?\\]/g, "\\$&").replace(/\*+/g, function(str){
return str === "*" ? ".*" : "[^/]*";
});
return "^" + reg + "$";
}
function getUrlHost(url) {
var a = document.createElement('a');
a.href = url;
return a.host;
}
// 模板
$.nano = function(template, data) {
return template.replace(/\{([\w\.]*)\}/g, function(str, key) {
var keys = key.split("."),
v = data[keys.shift()];
try {
for (var i = 0, l = keys.length; i < l; i++) v = v[keys[i]];
} catch (e) {}
return (typeof v !== "undefined" && v !== null) ? v : "";
});
};
// jQuery text 完全匹配. e.g. a:econtains('最新章节')
$.expr[":"].econtains = function(obj, index, meta, stack) {
return (obj.textContent || obj.innerText || $(obj).text() || "").toLowerCase() == meta[3].toLowerCase();
};
/* jshint ignore: start */
function $x(aXPath, aContext) {
var nodes = [];
var doc = document;
aContext = aContext || doc;
try {
var results = doc.evaluate(aXPath, aContext, null,
XPathResult.ANY_TYPE, null);
var node;
while (node = results.iterateNext()) {
nodes.push(node);
}
} catch (ex) {}
return nodes;
}
if (typeof String.prototype.startsWith != 'function') {
String.prototype.startsWith = function(str) {
return this.slice(0, str.length) == str;
};
}
if (typeof String.prototype.endsWith != 'function') {
String.prototype.endsWith = function(str) {
return this.slice(-str.length) == str;
};
}
if (!String.prototype.includes) {
String.prototype.includes = function(search, start) {
if (typeof start !== 'number') {
start = 0;
}
if (start + search.length > this.length) {
return false;
} else {
return this.indexOf(search, start) !== -1;
}
};
}
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*/
jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return -d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return (b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return (b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return -d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return (b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return (b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return -d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return -d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return 0==b?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return 0==b?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return -d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return (b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;return 0==b?c:1==(b/=e)?c+d:(g||(g=.3*e),h<Math.abs(d)?(h=d,f=g/4):f=g/(2*Math.PI)*Math.asin(d/h),-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c)},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;return 0==b?c:1==(b/=e)?c+d:(g||(g=.3*e),h<Math.abs(d)?(h=d,f=g/4):f=g/(2*Math.PI)*Math.asin(d/h),h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c)},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;return 0==b?c:2==(b/=e/2)?c+d:(g||(g=e*.3*1.5),h<Math.abs(d)?(h=d,f=g/4):f=g/(2*Math.PI)*Math.asin(d/h),1>b?-.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:.5*h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+d+c)},easeInBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return void 0==f&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return (b/=e)<1/2.75?d*7.5625*b*b+c:2/2.75>b?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:2.5/2.75>b?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return e/2>b?.5*jQuery.easing.easeInBounce(a,2*b,0,d,e)+c:.5*jQuery.easing.easeOutBounce(a,2*b-e,0,d,e)+.5*d+c}});
/* jshint ignore: end */
// ===== 自定义站点规则 =====
const sites = [
// 详细版规则示例。注:该网站已无法访问。
{siteName: "泡书吧", // 站点名字... (可选)
url: "^https?://www\\.paoshu8\\.net/Html/\\S+\\.shtm$", // // 站点正则... (~~必须~~)
// 获取标题
titleReg: /(.*?)最新章节 [-_\\\/](.*?)[-_\/].*/, // 书籍标题、章节标题正则 (可选)
titlePos: 0, // 书籍标题位置:0 或 1 (可选,默认为 0)
titleSelector: "#title h1",
indexSelector: "a:contains('回目录')", // 首页链接 jQuery 选择器 (不填则尝试自动搜索)
prevSelector: "a:contains('翻上页')", // 上一页链接 jQuery 选择器 (不填则尝试自动搜索)
nextSelector: "a:contains('翻下页')", // 下一页链接 jQuery 选择器 (不填则尝试自动搜索)
// nDelay: 500, // 延迟0.5秒加载下一页
// style: '', // 站点样式
// 获取内容
contentSelector: "#BookText", // 内容 jQuery 选择器 (不填则尝试自动搜索)
useiframe: false, // (可选)下一页加载是否使用 iframe
// mutationSelector: "#chaptercontainer", // (可选)内容生成监视器
// 对内容的处理
contentHandle: false, // (可选)是否对内容进行特殊处理,诸如拼音字修复等,诸如起点等网站可禁用
fixImage: true, // (可选),图片居中,不分大小
contentReplace: /(\*W|(w|\(w).{10,25}(吧\*|)|\))|看小说就上|本书首发|泡.{1,6}吧|百度搜索阅读最新最全的小说|http:\/\/www.paoshu8.com\/|无弹窗/g, // 需要移除的内容正则 (可选)
contentPatch: function(fakeStub){ // (可选)内容补丁。解决翻页是脚本的情况
var $next = fakeStub.find('#LinkMenu');
$next.html($next.html().replace(/<script>ShowLinkMenu.*?(<a.*?a>).*?(<a.*?a>).*?script>/,'$1$2') +
'<a href=\'List.shtm\'>回目录</a>');
}
},
{siteName: '起点(2023-08)',
url: '^https://www\\.qidian\\.com/chapter/\\d+/\\d+/',
titleReg: '(.*?) _《(.*?)》小说在线阅读',
titlePos: 1,
contentSelector: '.content',
cleanSelector: '#app',
isVipChapter: function($doc) {
if ($doc.find('div:contains(这是VIP章节 需要订阅后才能阅读)').length) {
return true;
}
},
},
{siteName: '起点新版-阅文',
url: '^https?://(?:read|vipreader)\\.qidian\\.com/chapter/.*',
exclude: ' /lastpage/',
bookTitleSelector: '#bookImg',
titleSelector: 'h3.j_chapterName',
prevSelector: '#j_chapterPrev',
nextSelector: '#j_chapterNext',
indexSelector: '.chapter-control a:contains("目录"), #my_index',
// indexSelector: function(obj) {
// var url = obj.find(".chapter-control a:contains('目录')").attr('href');
// return url;
// },
contentSelector: '.read-content.j_readContent',
contentHandle: false,
contentRemove: '',
contentReplace: [
'手机用户请到m.qidian.com阅读。',
'起点中文网www.qidian.com欢迎广大书友光临阅读,最新、最快、最火的连载作品尽在起点原创!.*'
],
isVipChapter: function($doc) {
if ($doc.find('.vip-limit-wrap').length) {
return true;
}
},
contentPatch: function($doc) {
// 滚屏的方式无法获取下一页
if ($doc.find('#j_chapterPrev').length === 0) {
var $node = $doc.find('div[id^="chapter-"]');
// 加上一页链接
$('<div id="j_chapterPrev">')
.attr('href', $node.attr('data-purl'))
.appendTo($doc.find('body'));
// 加下一页链接
$('<div id="j_chapterNext">')
.attr('href', $node.attr('data-nurl'))
.appendTo($doc.find('body'));
// 目录
var indexUrl = $('#bookImg').attr('href') + '#Catalog';
$('<div id="my_index">目录</div>')
.attr('href', indexUrl)
.appendTo($doc.find('body'));
}
}
},
// 特殊站点,需再次获取且跨域。添加 class="reader-ajax",同时需要 src, charset
{siteName: '起点新版',
url: '^https?://read\\.qidian\\.com/BookReader/.*\\.aspx',
bookTitleSelector: '.story_title .textinfo a:nth-child(1)',
titleSelector: '.story_title h1',
prevSelector: '#pagePrevRightBtn',
nextSelector: '#pageNextRightBtn',
indexSelector: function() {
return location.href.replace(/,.*?\.aspx$/, '.aspx').replace('BookReaderNew', 'BookReader');
},
mutationSelector: "#chaptercontainer", // 内容生成监视器
mutationChildCount: 1,
contentSelector: '#content, .bookreadercontent',
contentRemove: 'a[href="http://www.qidian.com"]',
contentReplace: [
'手机用户请到m.qidian.com阅读。'
],
contentPatch: function(fakeStub){
fakeStub.find('script[src$=".txt"]').addClass('reader-ajax');
},
},
{siteName: "起点中文、起点女生、起点文学",
url: "^https?://(www|read|readbook|wwwploy|cga|big5ploy)\\.(qidian|qdmm|qdwenxue)\\.com/BookReader/.*",
// titleReg: "小说:(.*?)(?:独家首发)/(.*?)/.*",
titleSelector: "#lbChapterName",
bookTitleSelector: ".page_site > a:last",
// contentSelector: "#hdContent",
nextUrl: function($doc){ // 为了避免起点某次改版后把1页拆成2页,然后造成重复载入第一页的情况
var html = $doc.find('script:contains(nextpage=)').html();
if (!html) return;
var m = html.match(/nextpage='(.*?)'/);
if (m) return m[1];
},
prevUrl: function($doc){
var html = $doc.find('script:contains(prevpage=)').html();
if (!html) return;
var m = html.match(/prevpage='(.*?)'/);
if (m) return m[1];
},
contentReplace: {
"\\[img=(.*)\\]": "<p><img src='$1'></p><p>",
"\\[+CP.*(http://file.*\\.jpg)\\]+": "<p><img src='$1'></p><p>",
"\\[bookid=(\\d+),bookname=(.*?)\\]": "<a href='http://www.qidian.com/Book/$1.aspx'>$2</a>",
"www.cmfu.com发布|起点中文网www.qidian.com欢迎广大书友光临阅读.*": "",
'(<p>\\s+)?<a href="?http://www.(?:qidian|cmfu).com"?>起点中文网.*': '',
'([\\u4e00-\\u9fa5])[%¥]+([\\u4e00-\\u9fa5])': '$1$2', // 屏蔽词修正,例如:风%%骚
},
contentRemove: "span[id^='ad_'], .read_ma",
contentPatch: function(fakeStub){
fakeStub.find('script[src$=".txt"]').addClass('reader-ajax');
},
},
{siteName: "起点中文网免费频道",
url: "^https?://free\\.qidian\\.com/Free/ReadChapter\\.aspx",
titleSelector: ".title > h3",
bookTitleSelector: ".site_rect > a:last",
contentSelector: "#chapter_cont, #content",
contentRemove: ".nice_books",
contentReplace: {
"\\[img=(.*)\\]": "<p><img src='$1'></p><p>",
"\\[+CP.*(http://file.*\\.jpg)\\]+": "<p><img src='$1'></p><p>",
"\\[bookid=(\\d+),bookname=(.*?)\\]": "<a href='http://www.qidian.com/Book/$1.aspx'>$2</a>",
"www.cmfu.com发布|起点中文网www.qidian.com欢迎广大书友光临阅读.*": "",
'(<p>\\s+)?<a href="?http://www.(?:qidian|cmfu).com"?>起点中文网.*': ''
},
contentPatch: function(fakeStub) {
fakeStub.find('#chapter_cont, #content > script:first').addClass('reader-ajax');
}
},
{siteName: "创世中文网",
url: "^https?://(?:chuangshi|yunqi)\\.qq\\.com/|^http://dushu\\.qq\\.com/read.html\\?bid=",
bookTitleSelector: '.bookNav > a:last()',
titleSelector: '.story_title > h1',
nextSelector: '#rightFloatBar_nextChapterBtn',
prevSelector: '#rightFloatBar_preChapterBtn',
indexSelector: function() {
var m = location.href.match(/\/bk\/\w+\/(.*?)-r-\d+.html/);
if (m) {
return 'http://chuangshi.qq.com/bk/ls/' + m[1] + '-l.html';
} else {
return 'http://chuangshi.qq.com/bk/ls/' + unsafeWindow.bid + '-l.html';
}
},
contentSelector: ".bookreadercontent",
contentHandle: false,
mutationSelector: "#chaptercontainer", // 内容生成监视器,第一次运行用到,以后用下面的 getContent 函数
mutationChildCount: 1,
startFilter: function() {
// 下一页需要提前加 1
unsafeWindow.uuid = parseInt(unsafeWindow.uuid) + 1 + '';
},
getContent: function($doc, callback) { // this 指 parser
function _getReadPageUrl(uuid) {
if (!uuid) {
return 'javascript:void(0);';
}
var url = location.href.replace(/[?|#].*/gi, '');
return url.replace(/(\d)+\.html/, uuid + '.html');
}
function getPageUrlHtml(preChapterUUID, nextChapterUUID) {
var preReadUrl = _getReadPageUrl(preChapterUUID),
nextReadUrl = _getReadPageUrl(nextChapterUUID);
return '<a id="rightFloatBar_preChapterBtn" href="' + preReadUrl + '">上一页</a>' +
'<a id="rightFloatBar_nextChapterBtn" href="' + nextReadUrl + '">下一页</a>' + '\n';
}
var done = function (data) {
unsafeWindow.uuid = data.nextuuid; // 给下一页用
callback({
html: getPageUrlHtml(data.preuuid, data.nextuuid) + data.Content
});
};
exportFunction(done, unsafeWindow, { defineAs: "gm_mnr_cs_callback" });
unsafeWindow.CS.page.read.main.getChapterContent(unsafeWindow.bid, unsafeWindow.uuid,
unsafeWindow.gm_mnr_cs_callback);
},
},
{siteName: "纵横中文网",
url: "^https?://book\\.zongheng\\.com/\\S+\\/\\d+\\.html$",
contentHandle: false,
// titleReg: "(.*?)-(.*)",
titleSelector: "em[itemprop='headline']",
bookTitleSelector: ".tc h2",
contentSelector: '#readerFt',
contentPatch: function(fakeStub){
fakeStub.find('.watermark').remove();
// 给第几章添加空格
var chapterTitle = fakeStub.find(".tc > h2").text();
var chapterTitle1 = fakeStub.find(".tc > h2 em").text();
if(chapterTitle1) {
chapterTitle = chapterTitle.replace(chapterTitle1, " ") + chapterTitle1;
}
fakeStub.find("title").text(
fakeStub.find(".tc > h1").text() + "-" + chapterTitle
);
}
},
{siteName: "晋江文学网",
url: /^https?:\/\/(www|my)\.jjwxc\.net\/onebook(|_vip)\.php\S*/,
titleReg: /《(.*?)》.*[ˇ^](.*?)[ˇ^].*/,
titlePos: 0,
// titleSelector: 'h2',
titleSelector: '#chapter_list > option:first',
// bookTitleSelector: 'h1 .bigtext',
indexSelector: ".noveltitle > h1 > a",
contentSelector: '.noveltext',
contentHandle: false,