Greasy Fork

来自缓存

珠江培训中心视频 自动播放下一节

学习用

目前为 2023-12-14 提交的版本。查看 最新版本

// ==UserScript==
// @name         珠江培训中心视频 自动播放下一节
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  学习用
// @author       阿礼 亮
// @match        https://grcbank.21tb.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=21tb.com
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    $('head').append($(`
  <!-- JS部分 -->
  <script>
     function next() {
      for (var i = 0; i < 1080; i++) {
      setTimeout(
       (from_HL) => {
       if (!(document.querySelector(".next-button"))){console.log("try to click next button");}
       else{document.querySelector(".next-button").click();console.log("click successful");}
      }, 10000*i, i,);
    } //每10秒钟尝试点击一次,最多持续3小时
    };
    next();
  </script>`));
    // Your code here...
})();