Skip to content

Commit

Permalink
5.3.1 修正 chuangshi 目录页无效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ywzhaiqi committed Feb 13, 2016
1 parent 36503a7 commit ab8f986
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 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.3.0
// @version 5.3.1
// @namespace https://github.com/ywzhaiqi
// @author ywzhaiqi
// @contributor Roger Au, shyangs, JixunMoe、akiba9527 及其他网友
Expand Down Expand Up @@ -481,7 +481,12 @@ Rule.specialSite = [
nextSelector: '#rightFloatBar_nextChapterBtn',
prevSelector: '#rightFloatBar_preChapterBtn',
indexSelector: function() {
return 'http://chuangshi.qq.com/bk/ds/' + unsafeWindow.bid + '-l.html';
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",
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.0",
"version": "5.3.1",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-jshint": "~0.10.0",
Expand Down
7 changes: 6 additions & 1 deletion MyNovelReader/src/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@ Rule.specialSite = [
nextSelector: '#rightFloatBar_nextChapterBtn',
prevSelector: '#rightFloatBar_preChapterBtn',
indexSelector: function() {
return 'http://chuangshi.qq.com/bk/ds/' + unsafeWindow.bid + '-l.html';
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",
Expand Down

0 comments on commit ab8f986

Please sign in to comment.