Skip to content

Commit

Permalink
更改 merge 到分文件中
Browse files Browse the repository at this point in the history
  • Loading branch information
ywzhaiqi committed Apr 4, 2017
1 parent 52136ec commit 17483a1
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 81 deletions.
144 changes: 69 additions & 75 deletions MyNovelReader/MyNovelReader.user.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// ==UserScript==
// ==UserScript==
// @id mynovelreader@[email protected]
// @name My Novel Reader
// @name:zh-CN 小说阅读脚本
// @name:zh-TW 小說閱讀腳本
// @version 5.3.4
// @version 5.3.5
// @namespace https://github.com/ywzhaiqi
// @author ywzhaiqi
// @contributor Roger Au, shyangs, JixunMoe、akiba9527 及其他网友
Expand Down Expand Up @@ -1894,85 +1894,79 @@ Rule.specialSite = [
}
}
},
{siteName: '起点新版-阅文',
url: 'http://read\\.qidian\\.com/chapter/.*',
bookTitleSelector: '#bookImg',
titleSelector: '.j_chapterName h1',

prevSelector: '#j_chapterPrev',
nextSelector: '#j_chapterNext',
indexSelector: function(obj) {
var url = obj.find(".chapter-control a:contains('目录')").attr('href');
return url;
},

//mutationSelector: "#chaptercontainer", // 内容生成监视器
//mutationChildCount: 1,
contentSelector: '.read-content.j_readContent',
contentReplace: [
'手机用户请到m.qidian.com阅读。'
],
{siteName: '起点新版-阅文',
url: 'http://read\\.qidian\\.com/chapter/.*',
bookTitleSelector: '#bookImg',
titleSelector: '.j_chapterName h1',

prevSelector: '#j_chapterPrev',
nextSelector: '#j_chapterNext',
indexSelector: function(obj) {
var url = obj.find(".chapter-control a:contains('目录')").attr('href');
return url;
},

//mutationSelector: "#chaptercontainer", // 内容生成监视器
//mutationChildCount: 1,
contentSelector: '.read-content.j_readContent',
contentReplace: [
'手机用户请到m.qidian.com阅读。'
],
},
{siteName: '书海小说',
url: '^http://www\\.shuhai\\.com/read/\\d+/\\d+\\.html',
bookTitleSelector: '.path2 a:nth-of-type(3)',
titleSelector: '.read_top h1',
prevSelector: '.read .read_dwn p a:nth-of-type(1)',
indexSelector: '.read .read_dwn p a:nth-of-type(2)',
nextSelector: '.read .read_dwn p a:nth-of-type(3)',
contentSelector: '.read .txt',
},
{siteName: "欢乐书客",
url: "^http://www\\.hbooker\\.com/chapter/book_chapter_detail/\\d+",
bookTitleSelector: ".breakcrumb > a:last",
titleSelector: ".book-read-box .read-hd h3",
useiframe: true,
timeout: 500,
contentSelector: ".book-read-box .read-bd",
contentRemove: ".book-read-box .barrage, #J_BtnGuide, .book-read-box .read-bd i.num, .chapter i, .J_Num, .num, .book-read-box .read-hd p:nth-of-type(1) span",

indexSelector: ".book-read-page a.btn-list",
nextUrl: function ($doc){
return $doc.find('#J_BtnPageNext').attr('data-href');
},
prevUrl: function ($doc){
return $doc.find('#J_BtnPagePrev').attr('data-href');
},
},
{siteName: '书海小说',
url: '^http://www\\.shuhai\\.com/read/\\d+/\\d+\\.html',
bookTitleSelector: '.path2 a:nth-of-type(3)',
titleSelector: '.read_top h1',
prevSelector: '.read .read_dwn p a:nth-of-type(1)',
indexSelector: '.read .read_dwn p a:nth-of-type(2)',
nextSelector: '.read .read_dwn p a:nth-of-type(3)',
contentSelector: '.read .txt',
contentRemove: '',
contentReplace: [
'',
{"":""},
],
},
{siteName: "欢乐书客",
url: "^http://www\\.hbooker\\.com/chapter/book_chapter_detail/\\d+",
bookTitleSelector: ".breakcrumb > a:last",
titleSelector: ".book-read-box .read-hd h3",
useiframe: true,
timeout: 500,
contentSelector: ".book-read-box .read-bd",
contentRemove: ".book-read-box .barrage, #J_BtnGuide, .book-read-box .read-bd i.num, .chapter i, .J_Num, .num, .book-read-box .read-hd p:nth-of-type(1) span",

indexSelector: ".book-read-page a.btn-list",
nextUrl: function ($doc){
return $doc.find('#J_BtnPageNext').attr('data-href');
},
prevUrl: function ($doc){
return $doc.find('#J_BtnPagePrev').attr('data-href');
},
},
{siteName: '棉花糖小说网',
url: '^http://www\\.mianhuatang\\.la/\\d+/\\d+/\\d+\\.html',
bookTitleSelector: '.nav > a:nth-of-type(3)',
titleSelector: '.read_title h1',
prevSelector: '.pagego a:nth-of-type(1)',
indexSelector: '.pagego a:nth-of-type(2)',
nextSelector: '.pagego a:nth-of-type(3)',
contentSelector: '.content',
contentRemove: 'a, .contads',
contentReplace: [
'下载本书最新的txt电子书请点击:',
'本书手机阅读:',
'发表书评:',
'为了方便下次阅读,你可以在点击下方的.*谢谢您的支持!!',
'',
{ '': '' },
],
url: '^http://www\\.mianhuatang\\.la/\\d+/\\d+/\\d+\\.html',
bookTitleSelector: '.nav > a:nth-of-type(3)',
titleSelector: '.read_title h1',
prevSelector: '.pagego a:nth-of-type(1)',
indexSelector: '.pagego a:nth-of-type(2)',
nextSelector: '.pagego a:nth-of-type(3)',
contentSelector: '.content',
contentRemove: 'a, .contads',
contentReplace: [
'下载本书最新的txt电子书请点击:',
'本书手机阅读:',
'发表书评:',
'为了方便下次阅读,你可以在点击下方的.*谢谢您的支持!!'
],
},
{siteName: '墨缘文学网',
url: '^http://www\\.moyuanwenxue\\.com/xiaoshuo/\\d+/\\d+/\\d+\\.htm',
contentSelector: '#chapterContent',
contentReplace: [
'',
{"ZHAN":""},
{"LU":""},
{"SHOU  QIANG":"手枪"},
{"si wang":"死亡"},
],
},
contentReplace: [
{"ZHAN":"战"},
{"LU":""},
{"SHOU  QIANG":"手枪"},
{"si wang":"死亡"},
],
},

];

// ===== 小说拼音字、屏蔽字修复 =====
Expand Down Expand Up @@ -2116,7 +2110,7 @@ Rule.replace = {
"弥俩": "你俩",
"妳": "你",
"圞|垩|卝|龘":"",
"大6":"大陆",
"大6": "大陆",
};

_.each(oneWordReplace, function(value, key) {
Expand Down
2 changes: 1 addition & 1 deletion MyNovelReader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MyNovelReader",
"version": "5.3.4",
"version": "5.3.5",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.10.0",
Expand Down
15 changes: 15 additions & 0 deletions MyNovelReader/src/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,21 @@
// @include http://www.biqugezw.com/*/*.html
// @include http://www.54tushu.com/book_library/chaptershow/theId/*.html
// @include http://www.snwx8.com/book/*/*/*.html
// @include http://read.qidian.com/chapter/*
// @include http://www.23zw.me/olread/*/*/*.html
// @include http://www.piaotian.com/html/*/*/*.html
// @include http://www.dhzw.org/book/*/*/*.html
// @include http://www.biqiuge.com/book/*/*.html
// @include http://www.baquge.com/files/article/html/*/*/*.html
// @include http://www.qu.la/book/*/*.html
// @include http://www.bxwx9.org/b/*/*/*.html
// @include http://www.miaobige.com/*/*/*.html
// @include http://www.remenxs.com/du_*/*/
// @include http://www.shuhai.com/read/*/*.html
// @include http://www.hbooker.com/chapter/book_chapter_detail/*
// @include http://www.mianhuatang.la/*/*/*.html
// @include http://www.paomov.com/*/*/*.html
// @include http://www.moyuanwenxue.com/xiaoshuo/*/*/*.htm

// @exclude */List.htm
// @exclude */List.html
Expand Down
87 changes: 82 additions & 5 deletions MyNovelReader/src/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ Rule.specialSite = [
}
},
{siteName: '23中文',
url: '^http://www\\.23zw\\.com/.*\\.html',
url: '^http://www\\.23zw\\.(com|me)/.*\\.html',
contentReplace: [
'本文由首发',
'章节更新最快',
Expand Down Expand Up @@ -820,7 +820,7 @@ Rule.specialSite = [
contentSelector: '#ChapterBody',
},
{siteName: "武林中文网",
url: '^http://www\\.50zw\\.com/book_\\d+/\\d+\\.html',
url: '^http://www\\.50zw\\.(com|co|la)/book_\\d+/\\d+\\.html',
bookTitleSelector: '.srcbox > a:last',
contentReplace: [
'更新最快【】',
Expand Down Expand Up @@ -1089,7 +1089,7 @@ Rule.specialSite = [
contentSelector: "#showcontent",
},
{siteName: "飘天文学",
url: "http://www\\.piaotian\\.net/html/\\d+/\\d+/\\d+\\.html",
url: "http://www\\.piaotian\\.(net|com)/html/\\d+/\\d+/\\d+\\.html",
// titleReg: "(.*)最新章节,(.*),飘天文学",
bookTitleSelector: '#content > h1 > a',
contentSelector: "#content",
Expand All @@ -1099,7 +1099,8 @@ Rule.specialSite = [
/[{〖]请在百度搜索.*[}〗]|.(?:百度搜索飄天|无弹窗小说网).*\.Net.|\[飄天.*无弹窗小说网\]/ig,
'\\{飘天文学www.piaotian.net感谢各位书友的支持,您的支持就是我们最大的动力\\}',
'章节更新最快',
'支持网站发展,逛淘宝买东西.*'
'支持网站发展,逛淘宝买东西.*',
'天才壹秒記住,為您提供精彩閱讀。.*'
],
},
{siteName: "天使小说网",
Expand Down Expand Up @@ -1540,6 +1541,78 @@ Rule.specialSite = [
}
},

{siteName: '起点新版-阅文',
url: 'http://read\\.qidian\\.com/chapter/.*',
bookTitleSelector: '#bookImg',
titleSelector: '.j_chapterName h1',

prevSelector: '#j_chapterPrev',
nextSelector: '#j_chapterNext',
indexSelector: function(obj) {
var url = obj.find(".chapter-control a:contains('目录')").attr('href');
return url;
},

//mutationSelector: "#chaptercontainer", // 内容生成监视器
//mutationChildCount: 1,
contentSelector: '.read-content.j_readContent',
contentReplace: [
'手机用户请到m.qidian.com阅读。'
],
},
{siteName: '书海小说',
url: '^http://www\\.shuhai\\.com/read/\\d+/\\d+\\.html',
bookTitleSelector: '.path2 a:nth-of-type(3)',
titleSelector: '.read_top h1',
prevSelector: '.read .read_dwn p a:nth-of-type(1)',
indexSelector: '.read .read_dwn p a:nth-of-type(2)',
nextSelector: '.read .read_dwn p a:nth-of-type(3)',
contentSelector: '.read .txt',
},
{siteName: "欢乐书客",
url: "^http://www\\.hbooker\\.com/chapter/book_chapter_detail/\\d+",
bookTitleSelector: ".breakcrumb > a:last",
titleSelector: ".book-read-box .read-hd h3",
useiframe: true,
timeout: 500,
contentSelector: ".book-read-box .read-bd",
contentRemove: ".book-read-box .barrage, #J_BtnGuide, .book-read-box .read-bd i.num, .chapter i, .J_Num, .num, .book-read-box .read-hd p:nth-of-type(1) span",

indexSelector: ".book-read-page a.btn-list",
nextUrl: function ($doc){
return $doc.find('#J_BtnPageNext').attr('data-href');
},
prevUrl: function ($doc){
return $doc.find('#J_BtnPagePrev').attr('data-href');
},
},
{siteName: '棉花糖小说网',
url: '^http://www\\.mianhuatang\\.la/\\d+/\\d+/\\d+\\.html',
bookTitleSelector: '.nav > a:nth-of-type(3)',
titleSelector: '.read_title h1',
prevSelector: '.pagego a:nth-of-type(1)',
indexSelector: '.pagego a:nth-of-type(2)',
nextSelector: '.pagego a:nth-of-type(3)',
contentSelector: '.content',
contentRemove: 'a, .contads',
contentReplace: [
'下载本书最新的txt电子书请点击:',
'本书手机阅读:',
'发表书评:',
'为了方便下次阅读,你可以在点击下方的.*谢谢您的支持!!'
],
},
{siteName: '墨缘文学网',
url: '^http://www\\.moyuanwenxue\\.com/xiaoshuo/\\d+/\\d+/\\d+\\.htm',
contentSelector: '#chapterContent',
contentReplace: [
{"ZHAN":"战"},
{"LU":"路"},
{"SHOU  QIANG":"手枪"},
{"si wang":"死亡"},
],
},

];

// ===== 小说拼音字、屏蔽字修复 =====
Expand Down Expand Up @@ -1569,6 +1642,9 @@ Rule.replace = {
//"”(,|,|。)": "”",
"@{3,}": "",

// === 段末的多余的r ===
"r<br>":"<br>",

// === 一些特殊的替换 ===
"\\[+CP.*(http://file.*\\.jpg)\\]+": "<img src='$1'>",
"『(.)』": "$1", // "『色』": "色",
Expand Down Expand Up @@ -1679,7 +1755,8 @@ Rule.replace = {
// ===其他修正===
"弥俩": "你俩",
"妳": "你",
"圞|垩|卝|龘":""
"圞|垩|卝|龘":"",
"大6": "大陆",
};

_.each(oneWordReplace, function(value, key) {
Expand Down

0 comments on commit 17483a1

Please sign in to comment.