File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,8 +40,11 @@ function getTime(){
4040 * @returns {*|jQuery }
4141 */
4242function getStatus ( ) {
43- var span = $ ( window . parent [ "w_lms_content" ] . document ) . find ( "#tdRemark span" ) ;
44- return $ ( span ) . hasClass ( "completed" ) ;
43+ var html = $ ( window . parent [ "w_lms_content" ] . document ) . find ( "#tdRemark" ) [ 0 ] . innerHTML ;
44+ if ( html && html . indexOf ( "completed" ) != - 1 ) {
45+ return true ;
46+ }
47+ return false ;
4548}
4649
4750
@@ -72,13 +75,13 @@ function startStudy() {
7275 console . log ( "自动正在学习中..." ) ;
7376
7477 if ( ! ( $ ( "#StudyStatus" ) . length > 0 ) ) {
75- $ ( 'body' ) . append ( "<div id='StudyStatus' style='position: fixed; z-index: 11111;font-weight: bold; bottom: 30px; left: 6px; color: red'>自动正在学习中...</div>" )
78+ $ ( 'body' ) . append ( "<div id='StudyStatus' style='background: #e1dfe2; width: 100%; text-align: center; position: fixed; z-index: 11111;font-weight: bold; bottom: 30px; color: red'>自动正在学习中...</div>" )
7679 }
7780
7881 if ( ( i % 2 ) == 1 ) {
79- $ ( '#StudyStatus' ) . text ( '自动正在学习中...' ) ;
82+ $ ( '#StudyStatus' ) . html ( '自动正在学习中...' ) ;
8083 } else {
81- $ ( '#StudyStatus' ) . text ( '自动正在学习中' ) ;
84+ $ ( '#StudyStatus' ) . html ( '自动正在学习中 ' ) ;
8285 }
8386
8487
You can’t perform that action at this time.
0 commit comments