Git Product home page Git Product logo

Comments (7)

lolisaikou avatar lolisaikou commented on August 10, 2024

我测试一下,最快明天上线

from lazystudy.

lolisaikou avatar lolisaikou commented on August 10, 2024

image
增加了一个按钮可以供选择
为什么只有这两个选项?因为每天都有大量新文章貌似只有这两个地方(如果有别的地方希望大家指出)
总感觉这个功能对刚开始看这个的没用

from lazystudy.

aweder avatar aweder commented on August 10, 2024

其实文章标题是有个ID的,建议获取文章标题
//获取当前正在阅读的文章标题
var currentNewsTitle = ""
if (textContains("来源").exists()) { // 有时无法获取到 来源
currentNewsTitle = textContains("来源").findOne().parent().children()[0].text();
} else if (textContains("作者").exists()) {
currentNewsTitle = textContains("作者").findOne().parent().children()[0].text();
} else if (descContains("来源").exists()) {
currentNewsTitle = descContains("来源").findOne().parent().children()[0].desc();
} else if (descContains("作者").exists()) {
currentNewsTitle = descContains("作者").findOne().parent().children()[0].desc();

这段直接改为按ID查然后获取标题下面的那个view找会更准,免得老是找不到标题,如下面代码中加粗部分,标题id为xxqg-article-header这个控件下,只有一个view,则是标题内容

** **

from lazystudy.

lolisaikou avatar lolisaikou commented on August 10, 2024

因为有些功能还需要测试,所以今天还不能更新

from lazystudy.

lolisaikou avatar lolisaikou commented on August 10, 2024

其实文章标题是有个ID的,建议获取文章标题
//获取当前正在阅读的文章标题
var currentNewsTitle = ""
if (textContains("来源").exists()) { // 有时无法获取到 来源
currentNewsTitle = textContains("来源").findOne().parent().children()[0].text();
} else if (textContains("作者").exists()) {
currentNewsTitle = textContains("作者").findOne().parent().children()[0].text();
} else if (descContains("来源").exists()) {
currentNewsTitle = descContains("来源").findOne().parent().children()[0].desc();
} else if (descContains("作者").exists()) {
currentNewsTitle = descContains("作者").findOne().parent().children()[0].desc();

这段直接改为按ID查然后获取标题下面的那个view找会更准,免得老是找不到标题,如下面代码中加粗部分,标题id为xxqg-article-header这个控件下,只有一个view,则是标题内容


我发现了已经改过了

from lazystudy.

lolisaikou avatar lolisaikou commented on August 10, 2024

已更新,可以到release页面下载

from lazystudy.

Muyanglaw avatar Muyanglaw commented on August 10, 2024

厉害了,刚准备反馈下这个问题,没想到今天上来就看到解决了,辛苦了

from lazystudy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.