Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

每篇文章/视频的阅读时间相对随机一点 #96

Open
4 tasks done
threerog opened this issue Apr 7, 2023 · 1 comment
Open
4 tasks done

每篇文章/视频的阅读时间相对随机一点 #96

threerog opened this issue Apr 7, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@threerog
Copy link

threerog commented Apr 7, 2023

清单

脚本名称

不学习何以强国.js

软件/源码版本

20230318

系统版本,包含位数

win11

浏览器版本

Edge 111.0.1661.41

油猴等插件和它的版本

4.18.1

详细描述

每篇文章/视频的阅读时间相对随机一点
现在时间是固定的全部等待一样的时间 估计有风险
而且有些新闻文章总共才两句话 然后看了很久 也没必要
视频总共1分钟 结果停留了4分钟

@threerog threerog added the bug Something isn't working label Apr 7, 2023
@yuki-chenn
Copy link

yuki-chenn commented Apr 9, 2023

代码的291行 和 294 行如下

async function reading(type) {
    //看文章或者视频
    var time = 1;
    if (type == 0) {
        time = parseInt(Math.random() * (90 - 70 + 1) + 70, 10);//80-100秒后关闭页面,看文章
    } else {
        time = parseInt(Math.random() * (90 - 70 + 1) + 70, 10);//230-250秒后关闭页面,看视频
    }
...

其中的time表示持续的时间,如果你需要修改看文章和视频的事件只需要修改Math.random() * (90 - 70 + 1) + 70加粗部分,目前我是修改过后的结果,表示随机70-90之间的秒数,目前测试可以获得全部积分,原代码的时间与注释对应,可以按需修改,不建议小于60秒。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants