Greasy Fork is available in English.
破解网课0次问题
当前为
// ==UserScript==
// @name 文亮网课次数破解
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 破解网课0次问题
// @author jjb
// @match wenliangwk.com
// @grant none
// ==/UserScript==
(function() {
'use strict';
myPlay()
videoClick();
function videoClick(){
try{
document.getElementsByTagName("video")[0].onclick = function (){
var playBtn = document.getElementsByClassName("prism-play-btn")[0]
var isPlaying = playBtn.classList.length === 1 ? false : true;
if (isPlaying) {
player.pause();
}else {
player.play()
}
}
}catch(error){}
}
function myPlay() {
player.off("playing")
var div = document.getElementsByClassName("box")[0];
div.parentNode.removeChild(div);
player.on('playing',function(e) {
if(player.getStatus()=='play' | player.getStatus()=='loading'){
if(stid!=null && stid!=undefined && stid!="" && "au_ye"==au){
player.play();
}else if(cookie_time!=null && (Date.parse(new Date())-cookie_time)/60000>10 && play_count>0){
player.play();
}else if(cookie_time!=null && (Date.parse(new Date())-cookie_time)/60000<=10 && play_count>0){
player.play();
return false;
}else{
player.play();
}
flag=setInterval(shuiyin, 6000);
player.on("ended", function(){
clearInterval(flag);
});
}else{
player.on('ended',function(e) {
confirmBoxE("试听结束");
});
}
})
}
// Your code here...
})();