Skip to content

Commit

Permalink
1.在书架查看书籍的界面,增加复制小说网址的菜单。
Browse files Browse the repository at this point in the history
2.在书源列表界面,增加检查书源是否包含发现规则,并增加/删除“发现”标签的功能。
3.在阅读界面,增加长按按钮“广告”,可以快速把正文添加到命名为“广告话术-xxx网址”的规则中去。针对此规则,使用了专门的增强算法。只需要多次标记不想看的文字,就可以获得较好的广告替换效果。用户不需要熟悉正则语法,不需要维护复杂的规则。同一个网站的广告话术自动保存在一个规则内,避免了“替换净化”列表里有太多多的规则。
4.在阅读界面,优化长按按钮“替换”,自动添加书名、网址到应用范围中。
5.进一步优化自动分段算法
6.长按选择文本的高亮色块的形状由弧边改为圆角矩形
  • Loading branch information
tumuyan committed Nov 2, 2020
1 parent 8208ee9 commit da7a243
Show file tree
Hide file tree
Showing 20 changed files with 973 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class BookInfoBean implements Cloneable {
private String chapterUrl; //章节目录地址,本地目录正则
private long finalRefreshData; //章节最后更新时间
private String coverUrl; //小说封面
private String author;//作者
private String author="";//作者
private String introduce; //简介
private String origin; //来源
private String charset;//编码
Expand Down
14 changes: 11 additions & 3 deletions app/src/main/java/com/kunfei/bookshelf/bean/BookSource3Bean.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private String searchUrl2RuleSearchUrl(String searchUrl) {
Gson gson = new Gson();
httpRequest request = gson.fromJson(strings[1], httpRequest.class);
if (gson.toJson(request).replaceAll("\\s", "").length() > 0) {
// 阅读2.0没有header,只有useragent
// 阅读2.0没有单独的header,只有useragent
if (request.headers != null) {
if (this.header == null)
this.header = request.headers;
Expand Down Expand Up @@ -208,6 +208,14 @@ public BookSourceBean toBookSourceBean() {
ruleFindUrl=exploreUrl.replaceAll("\\{\\{page\\}\\}","searchPage");
}

// 暂时只给发现和搜索添加了header
String header="";
if(this.header!=null){
if(this.header.trim().length()>0)
header="@Header:"+this.header.replaceAll("\\n"," ");
}


return new BookSourceBean(
bookSourceUrl,
bookSourceName,
Expand All @@ -218,7 +226,7 @@ public BookSourceBean toBookSourceBean() {
0, //u serialNumber,
weight,
true, //u enable,
ruleFindUrl,//发现规则 ruleFindUrl,
ruleFindUrl+header,//发现规则 ruleFindUrl,
ruleExplore.bookList, // 列表 ruleFindList,
ruleExplore.name,// ruleFindName,
ruleExplore.author,// ruleFindAuthor,
Expand All @@ -227,7 +235,7 @@ public BookSourceBean toBookSourceBean() {
ruleExplore.lastChapter,// ruleFindLastChapter,
ruleExplore.coverUrl,// ruleFindCoverUrl,
ruleExplore.bookUrl,//??? ruleFindNoteUrl,
RuleSearchUrl,// ruleSearchUrl,
RuleSearchUrl+header,// ruleSearchUrl,
ruleSearch.bookList,// ruleSearchList,
ruleSearch.name,// ruleSearchName,
ruleSearch.author,// ruleSearchAuthor,
Expand Down
Loading

0 comments on commit da7a243

Please sign in to comment.