Greasy Fork

【学习公社】学习中心视频自动打卡继续观看

学习公社学习中心,检测打卡弹窗并点击,检测继续观看弹窗并点击

目前为 2024-02-29 提交的版本。查看 最新版本

  // ==UserScript==
// @name         【学习公社】学习中心视频自动打卡继续观看
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  学习公社学习中心,检测打卡弹窗并点击,检测继续观看弹窗并点击
// @author       SimpleZ
// @icon         none
// @match        *://www.ttcdw.cn/*
// @grant        none
// @require      https://code.jquery.com/jquery-3.6.0.min.js
// @license MIT
// ==/UserScript==

(function() {
  'use strict';
  setInterval(function() {
      if ($('.layui-layer-title').text() === '随堂打卡') {
          var button = $('.question-wrapper-face button#comfirmClock')
          if (button) {
              button.trigger('click');
              if (button.text() === '确定打卡') console.log('已打卡')
              else console.log('继续学习')
              return
          }
      }
  }, 3000);
})();