Skip to content

Commit 0b029a5

Browse files
committedJun 1, 2014
MyNovelReader 移动到 old 文件夹,完善说明,增加百度贴吧手动调用方式。
1 parent a9ce885 commit 0b029a5

9 files changed

+54
-21
lines changed
 

‎MyNovelReader/README.md

+8-5
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33

44
### 文件说明
55

6-
- [mynovelreader@ywzhaiqi@gmailcom.user.js](mynovelreader@ywzhaiqi@gmailcom.user.js),GM 脚本
6+
- [mynovelreader@ywzhaiqi@gmailcom.user.js](mynovelreader@ywzhaiqi@gmailcom.user.js),GM 脚本[greasyfork 地址](https://greasyfork.org/scripts/292-my-novel-reader)
77
- [novelreaderdb@gmailcom.user.js](novelreaderdb@gmailcom.user.js),自定义配置文件
8-
- [MyNovelReader.js](MyNovelReader.js),自用于 Opera Mobile,去除jQuery版。
8+
- [MyNovelReader.mobile.js](MyNovelReader.mobile.js),自用于 Opera Mobile 12,去除jQuery版。
99
- 3.0.4 由网友 Roger Au 设计,[安装地址](http://userscripts.org/scripts/version/165951/639713.user.js)
1010

1111
### 说明
1212

13-
[greasyfork.org](https://greasyfork.org/scripts/292-my-novel-reader)
14-
1513
Firefox(Greasemonkey/Scriptish), Chrome(Tampermonkey),Maxthon(暴力猴),Opera(暴力猴)
1614

1715
3.0.4 界面由网友 Roger Au 设计,[安装地址](http://userscripts.org/scripts/version/165951/639713.user.js)
@@ -36,6 +34,7 @@ Opera 12 的暴力猴旧版本有个问题,请更新至新版。
3634
- 手打吧、泡书吧、17k、[16K](http://www.16kbook.org/)、看下、青帝、侠客等
3735
- [落秋中文](http://www.luoqiu.net/)[吾读小说网](http://www.5du5.com/)[平凡文学网](http://www.wtcxs.com/)
3836
- 其它小说站点
37+
- 百度贴吧:可通过手动书签的方式调用。
3938

4039
### 特性
4140

@@ -50,9 +49,11 @@ Opera 12 的暴力猴旧版本有个问题,请更新至新版。
5049
### 使用说明和技巧
5150

5251
- 默认设置从 booklink.me 点击的网站自动进入阅读模式
53-
- 手动调用代码(Firefox): `content.window.wrappedJSObject.readx();`,再次调用退出。
52+
- **书签调用方式**[调用 My Novel Reader](javascript:readx%20&&%20readx();),将此链接加为书签即可手动调用(右键或拖动到书签栏)。
53+
- **手动调用代码(Firefox)**: `content.window.wrappedJSObject.readx();`,再次调用退出。
5454
- **辅助脚本:[booklime.me 辅助](http://userscripts.org/scripts/show/165572)**:一键打开未读章节。
5555
- 鼠标双击内容暂停翻页。
56+
- 鼠标中键点击 "退出" 按钮则为临时退出模式。
5657
- Enter 键打开目录页,并已复制当前的章节标题到剪贴板,可用查找
5758
- Left 键滚到上一页,到顶部则打开上一章
5859
- Right 键滚到下一页,到底部则打开下一章
@@ -65,6 +66,8 @@ Opera 12 的暴力猴旧版本有个问题,请更新至新版。
6566

6667
### 更新
6768

69+
- 详见 [History for MyNovelReader - github](https://github.com/ywzhaiqi/userscript/commits/master/MyNovelReader)
70+
- .....
6871
- 2013年12月07日
6972
- [版本 3.7.9](http://userscripts.org/scripts/diff/165951/689214)。修正几个规则。
7073
- 2013年11月28日

‎MyNovelReader/mynovelreader@ywzhaiqi@gmailcom.user.js

+45-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ==UserScript==
22
// @id mynovelreader@ywzhaiqi@gmail.com
33
// @name My Novel Reader
4-
// @version 4.0.4
4+
// @version 4.0.5
55
// @namespace ywzhaiqigmail.com
66
// @author ywzhaiqi
77
// @description 小说阅读脚本,统一阅读样式,内容去广告、修正拼音字、段落整理,自动下一页
@@ -15,12 +15,12 @@
1515
// @grant GM_registerMenuCommand
1616
// @grant unsafeWindow
1717
// homepageURL https://userscripts.org/scripts/show/165951
18-
// updateURL https://greasyfork.org/scripts/292-my-novel-reader/code/My%20Novel%20Reader.meta.js
19-
// downloadURL https://greasyfork.org/scripts/292-my-novel-reader/code/My%20Novel%20Reader.user.js
18+
// updateURL https://userscripts.org/scripts/source/165951.meta.js
19+
// downloadURL https://userscripts.org/scripts/source/165951.user.js
2020

2121
// @homepageURL https://greasyfork.org/scripts/292/
22-
// @updateURL https://greasyfork.org/scripts/292/code.meta.js
23-
// @downloadURL https://greasyfork.org/scripts/292/code.user.js
22+
// @updateURL https://greasyfork.org/scripts/292-my-novel-reader/code/My%20Novel%20Reader.meta.js
23+
// @downloadURL https://greasyfork.org/scripts/292-my-novel-reader/code/My%20Novel%20Reader.user.js
2424
// @require http://code.jquery.com/jquery-1.9.1.min.js
2525
// @require http://cdn.jsdelivr.net/underscorejs/1.6.0/underscore-min.js
2626
// @resource fontawesomeWoff http://web-resource.googlecode.com/git/fontawesome-webfont.woff
@@ -46,6 +46,8 @@
4646
// @include http://www.readnovel.com/novel/*.html
4747
// http://www.tianyabook.com/*/*.htm
4848

49+
// @include http://tieba.baidu.com/p/*
50+
4951
// booklink.me
5052
// @include http://www.shumilou.com/*/*.html
5153
// @include http://www.wcxiaoshuo.com/wcxs-*-*/
@@ -269,6 +271,9 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
269271

270272
contentRemove: "script, iframe, font[color]", // 内容移除选择器
271273
contentReplace: /.?|||||\(.\)||&nbsp;|.....|| /g,
274+
removeLineRegExp: /<p>[ \s;\.]*<\/p>/g, // 移除只有一个字符的行
275+
276+
// 以下不常改
272277
replaceBrs: /(<br[^>]*>[ \n\r\t]*){1,}/gi, // 替换为<p>
273278
};
274279

@@ -413,6 +418,16 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
413418
contentSelector: "#article",
414419
contentRemove: "div[style]"
415420
},
421+
422+
{siteName: "百度贴吧(手动启用)",
423+
url: /^http:\/\/tieba\.baidu.com\/p\//,
424+
titleSelector: "h1.core_title_txt",
425+
// contentSelector: "div[id^='post_content_']",
426+
contentSelector: "#j_p_postlist",
427+
contentRemove: ".share_btn_wrapper, #sofa_post, .d_author",
428+
// 显示楼层的分割线
429+
style: ".clear { border-top:1px solid #cccccc; margin-bottom: 50px;}",
430+
},
416431
// {siteName: "天涯在线书库(部分支持)",
417432
// url: /www\.tianyabook\.com\/.*\.htm/,
418433
// titleSelector: ".max, h1:first",
@@ -582,7 +597,8 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
582597
bookTitleSelector: ".headinfo a:first",
583598
contentRemove: "p:contains(精品推荐:), p:contains(,免费小说阅读基地!), a",
584599
contentReplace: [
585-
"〖∷更新快∷无弹窗∷纯文字∷ .〗"
600+
"〖∷更新快∷无弹窗∷纯文字∷ .〗",
601+
"逸名文学屋:"
586602
]
587603
},
588604
{siteName: "奇书屋",
@@ -1044,7 +1060,10 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
10441060
},
10451061
{siteName: "努努书坊",
10461062
url: "http://book\\.kanunu\\.org/.*/\\d+/\\d+\\.html",
1063+
titleReg: /(.*) - (.*) - 线 - .* - /,
1064+
titlePos: 1,
10471065
contentSelector: "table:eq(4) p",
1066+
indexSelector: "a[href^='./']",
10481067
},
10491068
{siteName: "五月中文网",
10501069
url: "^http://5ycn\\.com/\\d+/\\d+/\\d+\\.html",
@@ -1185,6 +1204,7 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
11851204
"cao之过急":"操之过急",
11861205
"大公无si":"大公无私",
11871206
"fu道人家":"妇道人家",
1207+
"奸yin掳掠":"奸淫掳掠",
11881208
"空dangdang":"空荡荡",
11891209
"yin奉阳违":"阴奉阳违", "一yin一阳":"一阴一阳",
11901210

@@ -1198,7 +1218,7 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
11981218
"han住": "含住", "hai洛因": "海洛因", "红fen": "红粉", "火yao": "火药", "h[ǎa]oxi[àa]ng":"好像", "hu[áa]ngs[èe]":"黄色", "皇d[ìi]":"皇帝", "昏昏yu睡":"昏昏欲睡", "回dang":"回荡",
11991219
"jian(臣|细)":"奸$1", "jian货":"贱货", "jing察":"警察", "j[ìi]nháng":"进行", "ji烈":"激烈", "j[iì](nv|女)": "妓女", "jirou": "鸡肉", "ji者":"记者", "ju花":"菊花","j[īi]动":"激动", "jili[èe]":"激烈", "肌r[òo]u":"肌肉","ji射":"激射", "ji[ēe]ch[uù]":"接触", "j[ùu]li[èe]": "剧烈", "jǐng惕": "警惕", "节cao":"节操", "浸yin":"浸淫",
12001220
"k[ěe]n[ée]ng": "可能", "开bao": "开苞", "k[àa]o近": "靠近", "口wen":"口吻",
1201-
"ling辱": "凌辱", "luan蛋": "卵蛋", "脸sè": "脸色", "lu出":"露出", "流máng":"流氓",
1221+
"ling辱": "凌辱", "luan蛋": "卵蛋", "脸sè": "脸色", "lu出":"露出", "流máng":"流氓", "lun理":"伦理",
12021222
"m[ǎa]ny[ìi]":"满意", "m[ǎa]sh[àa]ng":"马上", "m[ée]iy[oǒ]u":"没有", "mei国": "美国", "m[íi]ngb[áa]i":"明白", "迷huan": "迷幻", "mi茫":"迷茫", "m[íi]n\\s{0,2}zh[ǔu]": "民主", "迷jian": "迷奸", "mimi糊糊":"迷迷糊糊", "末(?:\\s|<br/?>)*ì":"末日", "面se":"面色", "mengmeng":"蒙蒙",
12031223
"nàme":"那么", "n[ée]ngg[oò]u":"能够", "nán\\s{0,2}hǎi": "那会", "内jian":"内奸",
12041224
"pi[áa]o客":"嫖客", "p[áa]ngbi[āa]n":"旁边",
@@ -1647,7 +1667,7 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
16471667
}
16481668

16491669
// 删除空白的、单个字符的 p
1650-
text = text.replace(/<p>[ \s;\.]*<\/p>/g, "");
1670+
text = text.replace(rule.removeLineRegExp, "");
16511671

16521672
return text;
16531673
},
@@ -1814,6 +1834,11 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
18141834
if(App.isLaunched) return;
18151835
App.isLaunched = true;
18161836

1837+
// 百度贴吧的不好判断,手动调用 readx 启用
1838+
if (location.href.match(/^http:\/\/tieba\.baidu.com\/p\//)) {
1839+
return;
1840+
}
1841+
18171842
var isAutoLaunch = App.isAutoLaunch();
18181843
if(isAutoLaunch){
18191844
App.site = App.getCurSiteInfo();
@@ -1955,6 +1980,11 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
19551980
.prependTo(App.$chapterList);
19561981
}
19571982

1983+
// 插入站点样式
1984+
if (App.site.style) {
1985+
GM_addStyle(App.site.style);
1986+
}
1987+
19581988
App.appendPage(parser, true);
19591989

19601990
App.registerControls();
@@ -3252,12 +3282,12 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
32523282
};
32533283

32543284
function fakeTimeout(callback) {
3255-
// Register event listener
3256-
window.document.body.addEventListener("timeoutEvent", callback, false);
3257-
// Generate and dispatch synthetic event
3258-
var ev = document.createEvent("HTMLEvents");
3259-
ev.initEvent("timeoutEvent", true, false);
3260-
window.document.body.dispatchEvent(ev);
3285+
// Register event listener
3286+
window.document.body.addEventListener("timeoutEvent", callback, false);
3287+
// Generate and dispatch synthetic event
3288+
var ev = document.createEvent("HTMLEvents");
3289+
ev.initEvent("timeoutEvent", true, false);
3290+
window.document.body.dispatchEvent(ev);
32613291
}
32623292

32633293

@@ -3470,8 +3500,7 @@ if (!fontawesomeWoff || fontawesomeWoff.length < 10) {
34703500
box-shadow: 0 1px 0 rgba(255,255,255,0.05), inset 0 1px 3px rgba(0,0,0,0.3);\
34713501
}\
34723502
#chapter-list {\
3473-
position: absolute;\
3474-
top: 46px;\
3503+
position: relative;\
34753504
bottom: 0;\
34763505
left: 0;\
34773506
right: 0;\
File renamed without changes.
File renamed without changes.

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ GM 脚本
2626

2727
### [自用修改版](自用修改版)
2828

29+
**请使用原版,并不保证更新。**
2930

3031
在用的脚本(非原创,仅链接)
3132
---------------------------

0 commit comments

Comments
 (0)
Please sign in to comment.