导航菜单
首页 >  专技天下考试技巧  > 专技天下快速刷课时刷视频插件分享

专技天下快速刷课时刷视频插件分享

一、软件介绍:专技天下刷课时、专技天下刷学时、专技天下刷视频插件、专技天下快速刷课、专技天下快速刷题二、主要功能:1、自动刷视频2、自动刷课时、刷学时3、多倍速播放插件下载:https://wukongstudio.lanzouw.com/b01ic4zja插件运行界面截图:

专技天下刷课脚本截图02.png

三、主要原理:主要是通过浏览器安装用户脚本管理器Tampermonkey,油猴脚本是一个浏览器扩展、油猴支持很多主流的浏览器,Chrome、Firefox等,实现了脚本的一次编写,到处运行了,编写脚本需要准备的知识有:HTML+Javascript+jQuery,再添加专技天下刷课脚本来实现自动刷视频、答题等。四、部分代码:(function() {'use strict';// Your code here...

let interval = null;function main(url) {if (/studycontent$/.test(url)) {const container = document.querySelector(".viewContainer");const leaves = document.querySelectorAll(".leaf-detail");console.log(leaves);for (let i = 0; i < leaves.length; i++) {const leaf = leaves.item(i);const is_shipin = leaf.querySelector(".icon--shipin");if (is_shipin) {// console.log(leaf);const time = leaf.querySelector(".progress-time .progress-wrap .item");if(time.textContent.trim() !== "已完成") {time.scrollIntoView();container.scrollBy(0, -200);console.log(time);setTimeout(() => {time.click();}, 500);break;}}}}if (/video\/[0-9]+$/.test(url)) {interval = setInterval(() => {const video = document.querySelector("video");if (video.currentTime / video.duration === 1) {console.log("视频已经结束");history.back();

// document.querySelector(".f14.back.fl").click();clearInterval(interval);} else {console.log("继续监测视频是否结束");}},1000);}}

function speed(){const video = document.querySelector("video");video.playbackRate = 4.0;

// var speed = document.querySelector(".xt_video_player_common_list");// var speedChild = speed.firstChild;// speedChild.click();// console.log("Robot-开启4.0倍速");}

console.log("专技天下");const user_wrapper = document.querySelector(".user-wrapper");const btn = document.createElement("div");btn.classList.add("downloadbtn");const btn_icon = document.createElement("div");btn_icon.classList.add("el-badge", "item");const btn_icon_i = document.createElement("i");btn_icon_i.classList.add("icon--bofang1", "iconfont");btn_icon.appendChild(btn_icon_i);btn.appendChild(btn_icon);user_wrapper.prepend(btn);btn.addEventListener("click", () => {main(window.location.href);});// main(window.location.href)// console.log(window.onurlchange);if (window.onurlchange === null) {window.addEventListener("urlchange", (info) => {console.log(info);setTimeout(() => {main(info.url);}, 2000);});}

})();

相关推荐: