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

增加长时间阅读防止手机息屏 #428

Open
wants to merge 1 commit into
base: version-15.6
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Auto.js/学习强国.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,16 @@ if (!finish_list[2] && !finish_list[0]) {
// 阅读文章次数
var count = 0;

var id_fangxiping;
var thread_fangxiping_exceptions = threads.start(function () {
// 每2秒就处理访问异常
id_fangxiping = setInterval(handling_fangxiping, 5000);
});

function handling_fangxiping(){
toast("防息屏弹窗,请无视");
}

while ((count < 6 - completed_read_count) && !finish_list[0]) {

if (!id('comm_head_title').exists() || !className('android.widget.TextView').depth(27).text('切换地区').exists()) back_track();
Expand Down Expand Up @@ -410,6 +420,9 @@ while ((count < 6 - completed_read_count) && !finish_list[0]) {
sleep(random_time(500));
}

// 取消防息屏
if (id_fangxiping) clearInterval(id_fangxiping);

/*
*********************视听部分********************
*/
Expand Down