Greasy Fork is available in English.
小说阅读脚本,统一阅读样式,内容去广告、修正拼音字、段落整理,自动下一页
< Σχολιασμός για τον κώδικα My Novel Reader
{siteName: '小红花阅读网',
exampleUrl: 'https://xhhread.com/read/reading.jhtml?chapterid=8aada6395a597779015a93a372c90a55',
url: '^https?://xhhread\\.com/read/read\\w+\\.jhtml\\?chapterid=.*',
bookTitleSelector: '.H_book',
titleSelector: '.reading-title',
contentPatch: function($doc) {
// 修正上下页链接
var rules = {
'.H_readpreforwap': 'https://xhhread.com/read/readpreforwap.jhtml?chapterid=',
'.H_content': 'https://xhhread.com/read/contents.jhtml?storyid=',
'.H_readnextforwap': 'https://xhhread.com/read/readnextforwap.jhtml?chapterid=',
};
Object.keys(rules).forEach(function(selector) {
var $link = $doc.find(selector);
var chapterId = $link.attr('p');
if (chapterId) {
var url = rules[selector];
$link.attr('href', url + chapterId);
}
});
}
},
多谢,果然要增加函数啊
请教小红花阅读的下一章如何获取
想添加一下小红花阅读,发现下一章获取不了,请指点。 https://xhhread.com/read/reading.jhtml?chapterid=8aada6395a597779015a93a372c90a55 自己添加的代码:
底部导航栏部分的页面代码是这样的:
手动点击下一章之后的link实际为 https://xhhread.com/read/readnextforwap.jhtml?chapterid=8aada6395a597779015a93a372c90a55 这种方式该如何在脚本里获取下一章?