diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 17989e384..06c0bcaac 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -4,6 +4,24 @@ * 先在旧版阅读(2.x)中进行备份,然后在新版阅读(3.x)【我的】->【备份与恢复】,选择【导入旧版本数据】,提示存储权限,选择允许即可导入成功。 * 注意:由于安卓10更改了权限策略,还需要给「允许安装其他应用」的权限才能导入源。MIUI11也需要此权限。 +**2019/12/30** +* 修改书源调试 + - 调试搜索>>输入关键字,如:`系统` + - 调试发现>>输入发现URL,如:`月票榜::https://www.qidian.com/rank/yuepiao?page={{page}}` + - 调试详情页>>输入详情页URL,如:`https://m.qidian.com/book/1015609210` + - 调试目录页>>输入目录页URL,如:`++https://www.zhaishuyuan.com/read/30394` + - 调试正文页>>输入正文页URL,如:`--https://www.zhaishuyuan.com/chapter/30394/20940996` + +* 修改订阅中自动添加style的情景 + 订阅源的内容规则中存在` + ``` + **2019/12/28** * 添加下载界面 * 添加分组备份 diff --git a/app/src/main/java/io/legado/app/model/Debug.kt b/app/src/main/java/io/legado/app/model/Debug.kt index fee62972e..7d7ec3627 100644 --- a/app/src/main/java/io/legado/app/model/Debug.kt +++ b/app/src/main/java/io/legado/app/model/Debug.kt @@ -111,6 +111,24 @@ object Debug { log(webBook.sourceUrl, "⇒开始访问发现页:$url") exploreDebug(webBook, url) } + key.startsWith("++")-> { + val url = key.substring(2) + val book = Book() + book.origin = webBook.sourceUrl + book.tocUrl = url + log(webBook.sourceUrl, "⇒开始访目录页:$url") + tocDebug(webBook, book) + } + key.startsWith("--")-> { + val url = key.substring(2) + val book = Book() + book.origin = webBook.sourceUrl + log(webBook.sourceUrl, "⇒开始访正文页:$url") + val chapter = BookChapter() + chapter.title = "调试" + chapter.url = url + contentDebug(webBook, book, chapter, null) + } else -> { log(webBook.sourceUrl, "⇒开始搜索关键字:$key") searchDebug(webBook, key) diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt index 8c6f56279..98355d7d8 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt @@ -78,16 +78,17 @@ class ReadRssViewModel(application: Application) : BaseViewModel(application) { } fun clHtml(content: String): String { - return """ - - - - - - - $content - - """ + return if (content.contains("$content + """ + } } interface CallBack {