// ==UserScript== // @name 美和易思课堂 // @namespace http://www.9frd.com/ // @version 1.0.0 // @description 美和易思课堂自动播放 进行下一节 屏蔽鼠标限制 // @author 废人岛 // @icon https://www.wandhi.com/favicon.ico // @match http://www.51moot.net/server_hall_2/server_hall_2/video_play?dir_id=* // @require https://cdn.staticfile.org/jquery/1.12.4/jquery.min.js // @require https://greasyfork.org/scripts/373336-layer-wandhi/code/layer_wandhi.js?version=637587 // @grant GM_setClipboard // @run-at document-end // @grant unsafeWindow // @grant GM_xmlhttpRequest // @grant GM_info // @grant GM.getValue // @grant GM.setValue // @grant GM_getValue // @grant GM_setValue // @grant GM_notification // @downloadURL https://update.greasyfork.org/scripts/384222/%E7%BE%8E%E5%92%8C%E6%98%93%E6%80%9D%E8%AF%BE%E5%A0%82.user.js // @updateURL https://update.greasyfork.org/scripts/384222/%E7%BE%8E%E5%92%8C%E6%98%93%E6%80%9D%E8%AF%BE%E5%A0%82.meta.js // ==/UserScript== (function() { var css=$(' '); var html=$('
'); $("body").append(css); $("body").append(html); var myTimer=setInterval(cheack_time,2000); function cheack_time(){ if( !player.j2s_resumeVideo){ location.reload(); } // console.clear() //console.log(player.j2s_getDuration()+" "+ player.j2s_realPlayVideoTime()) document.getElementById("sun-time").innerText = player.j2s_getDuration(); document.getElementById("new-time").innerText =player.j2s_realPlayVideoTime(); player.j2s_setVolume(0); player.j2s_resumeVideo(); if (player.j2s_getDuration() <= player.j2s_realPlayVideoTime()) { if ($(".active").next().html() == undefined) { var next = $(".active").parents("div").parents("div").next().children("div").children("ul"); var nexth = next.html() if (RegExp(/湖北美和易思教/).test(nexth)) { clearInterval(myTimer); console.log("结束"); } else { next.children("li").eq(0).click() } } else { $(".active").next().click(); } } } // Your code here... })();