Skip to content

Commit 8fae127

Browse files
authored
Merge pull request #2 from izee/master
增加课程目录页,自动打开未开始或未完成的课程
2 parents aa5a4ed + d042ad6 commit 8fae127

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

StudyChromeApp/script.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ if(els.length > 0){
1616

1717
}, 1000);
1818
}
19-
19+
else {
20+
setTimeout(function () {
21+
var link = $('a', $('.notattempt').first().parents('tr').first());
22+
if (link.length < 1) {
23+
link = $('a', $('.incomplete').first().parents('tr').first());
24+
}
25+
if (link.length > 0) {
26+
link[0].click();
27+
}
28+
}, 2000);
29+
}
2030

2131
/**
2232
* 获取学习时间

0 commit comments

Comments
 (0)