Skip to content

Commit

Permalink
5.2.1 修正起点目录问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ywzhaiqi committed Sep 22, 2015
1 parent afa6981 commit ad41a84
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
17 changes: 11 additions & 6 deletions MyNovelReader/MyNovelReader.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @name My Novel Reader
// @name:zh-CN 小说阅读脚本
// @name:zh-TW 小說閱讀腳本
// @version 5.2.0
// @version 5.2.1
// @namespace https://github.com/ywzhaiqi
// @author ywzhaiqi
// @contributor Roger Au, shyangs, JixunMoe、akiba9527 及其他网友
Expand Down Expand Up @@ -433,7 +433,7 @@ Rule.specialSite = [
prevSelector: '#pagePrevRightBtn',
nextSelector: '#pageNextRightBtn',
indexSelector: function() {
return location.href.replace(/,\d+\.aspx$/, '.aspx').replace('BookReaderNew', 'BookReader');
return location.href.replace(/,\w+\.aspx$/, '.aspx').replace('BookReaderNew', 'BookReader');
},

mutationSelector: "#chaptercontainer", // 内容生成监视器
Expand Down Expand Up @@ -663,6 +663,7 @@ Rule.specialSite = [
"<无-错>",
"—无—错—小说",
"\\+无\\+错\\+",
"&amp;无&amp;错&amp;小说",
"+无+错+小说+3W.++com",
"无错小说 www.quled[Uu].com",
],
Expand Down Expand Up @@ -4340,10 +4341,14 @@ var App = {
},
openUrl: function(url, errorMsg) {
if (url) {
// ff30 Greasemonkey 会报错:Greasemonkey 访问违规:unsafeWindow 无法调用 GM_openInTab。新建脚本采用按键调用也这样。
setTimeout(function() {
GM_openInTab(url, false);
}, 0);
if (location.host.indexOf('qidian.com') != -1) { // 起点做了防盗链处理?
$('#header a')[0].click();
} else {
// ff30 Greasemonkey 会报错:Greasemonkey 访问违规:unsafeWindow 无法调用 GM_openInTab。新建脚本采用按键调用也这样。
setTimeout(function() {
GM_openInTab(url, false);
}, 0);
}
} else if (errorMsg) {
UI.notice(errorMsg);
}
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.2.0",
"version": "5.2.1",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.10.0",
Expand Down
12 changes: 8 additions & 4 deletions MyNovelReader/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,14 @@ var App = {
},
openUrl: function(url, errorMsg) {
if (url) {
// ff30 Greasemonkey 会报错:Greasemonkey 访问违规:unsafeWindow 无法调用 GM_openInTab。新建脚本采用按键调用也这样。
setTimeout(function() {
GM_openInTab(url, false);
}, 0);
if (location.host.indexOf('qidian.com') != -1) { // 起点做了防盗链处理?
$('#header a')[0].click();
} else {
// ff30 Greasemonkey 会报错:Greasemonkey 访问违规:unsafeWindow 无法调用 GM_openInTab。新建脚本采用按键调用也这样。
setTimeout(function() {
GM_openInTab(url, false);
}, 0);
}
} else if (errorMsg) {
UI.notice(errorMsg);
}
Expand Down
3 changes: 2 additions & 1 deletion MyNovelReader/src/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Rule.specialSite = [
prevSelector: '#pagePrevRightBtn',
nextSelector: '#pageNextRightBtn',
indexSelector: function() {
return location.href.replace(/,\d+\.aspx$/, '.aspx').replace('BookReaderNew', 'BookReader');
return location.href.replace(/,\w+\.aspx$/, '.aspx').replace('BookReaderNew', 'BookReader');
},

mutationSelector: "#chaptercontainer", // 内容生成监视器
Expand Down Expand Up @@ -352,6 +352,7 @@ Rule.specialSite = [
"<无-错>",
"—无—错—小说",
"\\+无\\+错\\+",
"&amp;无&amp;错&amp;小说",
"+无+错+小说+3W.++com",
"无错小说 www.quled[Uu].com",
],
Expand Down

0 comments on commit ad41a84

Please sign in to comment.