Fuck Chaoxing
Fuck Chaoxingjavascript
a month ago
2.4 kB
3
Indexable
Never
// ==UserScript== // @name fuck+mooc1.chaoxing.com // @namespace https://mooc1.chaoxing.com // @version 0.1 // @description fuck+mooc1.chaoxing.com // @author person // @match https://mooc1.chaoxing.com/mycourse/studentstudy* // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org // @grant none // ==/UserScript== (function () { 'use strict'; let main = function () { let fuckBecausePause = function () { $($("#iframe").contents().find("iframe.ans-insertvideo-online")[0]).contents().find(".vjs-big-play-button").click(); } let fuckBecauseClick = function () { let needFuck = false; let currShitText = document.getElementsByClassName('prev_title')[0].textContent; let listShit = document.getElementsByClassName('posCatalog_select'); for (let i = 0; i <= listShit.length; i = i + 1) { let thisShit = listShit[i]; if (thisShit) { let thisShitText = thisShit.textContent; if (thisShitText.includes('已完成') || thisShitText.includes('待完成')) { if (thisShitText.includes(currShitText)) { if (thisShitText.includes('已完成')) { needFuck = true; } } } } } if (needFuck) { for (let i = 0; i <= listShit.length; i = i + 1) { let thisShit = listShit[i]; if (thisShit) { let thisShitText = thisShit.textContent; if (thisShitText.includes('已完成') || thisShitText.includes('待完成')) { if (thisShitText.includes('待完成')) { thisShit.childNodes[1].click(); return; } } } } } } setInterval(function () { fuckBecausePause(); fuckBecauseClick(); }, 1024); } window.onload = main; })();