您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
自动听在“我的课程”里的内容。
// ==UserScript== // @name 广东省药师协会课程 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 自动听在“我的课程”里的内容。 // @author han2ee // @match https://www.gdysxh.com/my_classes* // @run-at document-end // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); const CLASSES_URL = "https://www.gdysxh.com/my_classes/classes/index.html"; const TASK_URL_PREFIX = "http://120.25.166.167:8887/#/pages/course/detail"; const VIDEO_URL_REGEX = /https:\/\/www.gdysxh.com\/my_classes\/classes\/video\/course_id\/\d+\/order_id\/\d+.html/; let uniqFlag = null; let currentTime = 0; setInterval(() => { if (document.URL === CLASSES_URL) { let tasks = document.querySelectorAll("#concept tr td a"); tasks.forEach((task) => { if (!task.innerText.endsWith("100%")) { console.log(task.innerText); task.click(); } }); } else if (document.URL.match(VIDEO_URL_REGEX)) { // console.log("VIDEO"); if (uniqFlag != document.URL) { uniqFlag = document.URL; currentTime = 0; } let video = document.querySelector('#video'); if (video) { // video.muted=true; video.play(); let curTime = video.currentTime; if (curTime >= currentTime) { currentTime = curTime; } else { // 视频循环 已经听完 返回 document.querySelector("a.btn.back").click(); } } } }, 3000); // Your code here... })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址