Greasy Fork is available in English.

💯 懒人专用系列 ——— 全网 VIP 视频破解去广告 was reported 2024-06-20 for Illegal content

The reporter said:

此脚本会更新到外站带有优惠劵的第三方脚本
class VersionClass extends BaseClass{

constructor(){

super();

this.versionUrl = 'https://gitlab.com/lanhaha/lanrenjiaoben/-/raw/main/README.md?ref_type=heads';

this.renewVersionUrl = 'https://gitlab.com/lanhaha/lanrenjiaoben#%E5%AE%89%E8%A3%85tm';

let tipPageWrap = document.createElement('div');

tipPageWrap.id='tipWrap';

document.body.appendChild(tipPageWrap);

var _this = this;

(async function(){

let resp = await _this.checkTime();

if(!resp)return;

_this.checkRunTime();

})()

}
getVersion(mothed,url){

return new Promise((resolve,reject)=>{

GM_xmlhttpRequest({

method: mothed,

url: url,

data: '',

headers: {'Accept': 'text/plain, text/html,application/json'},

onload: function(res){

let resArray = res.responseText.split('\n');

let versionArray=[];

for(let i=0;i{

var _this = this;

let installTime = GM_getValue('installTime',0);

let date = new Date();

let dateNowTime = date.getTime();

let intervalTime = 86400*1000;

let versionIntervalTime = 86400*1000;

if(installTime){

if(dateNowTime-intervalTime>installTime){

let getVersionTime = GM_getValue('getVersionTime',0);

if(dateNowTime-versionIntervalTime > getVersionTime){

(async function(){

let date = new Date();

let nowTime = date.getTime();

let versionArr= await _this.getVersion('get',_this.versionUrl);

if(versionArr.length == 0){
console.log('没有获取到版本号');
return;

}

let versionObj=versionArr[0].split('.');

_this.versionOnline = [];

_this.versionOnline[0] = versionObj[0];

_this.versionOnline[1] = versionObj[1]?versionObj[1]:0;

_this.versionOnline[2] = versionObj[2]?versionObj[2]:0;

let versionNow = GM_info.script.version.split('.');

console.log(_this.versionOnline,versionNow);

let index;

for(let i=0;i<3;i++){

if(parseInt(_this.versionOnline[i]) > parseInt(versionNow[i])){

index=i;

break;
}

}

GM_setValue('getVersionTime',dateNowTime);

GM_setValue('vcodeResult',index);

GM_setValue('versionOnline',_this.versionOnline);

resolve(true);

})()

}else{

resolve(true);
}
}else{

resolve(false);
}

}else{

GM_setValue('installTime',dateNowTime);

resolve(false);

};

})

}

checkRunTime(){

var _this = this;

let date = new Date();

let dateNowTime = date.getTime();

let runTipTime = GM_getValue('runTipTime',0);//弹框时间

let vcodeResult = GM_getValue('vcodeResult');

_this.versionOnline = GM_getValue('versionOnline');

let tipIntervalTime = 60*1000;

if(dateNowTime-runTipTime > tipIntervalTime && vcodeResult != 'undefined'){

GM_setValue('runTipTime',dateNowTime);

switch(vcodeResult){

case 0:
_this.showTipPage();
break;

case 1:
_this.showTipPage();
break;

case 2:
_this.showTipPage();
break;

}

}

}

showTipPage(){

var _this = this;

//let setHtml = "

";

let setHtml ="
";

setHtml +="
  • 发现新版本
";

setHtml +="
";

setHtml +="

新版本 v"+this.versionOnline.join('.')+" 已发布。

";

setHtml +="

";

setHtml +="
";

setHtml +="查看更新";

setHtml +="忽略";

setHtml +='
';

setHtml += "
";

setTimeout(function(){

let versionTipDom = document.querySelector('#tipWrap');

if(!versionTipDom)return false;

versionTipDom.innerHTML = setHtml;

//document.body.appendChild(versionTipDom);

document.querySelector('#tipBackOn').addEventListener('click',function(e){

GM_setValue('installTime',new Date().getTime());

document.querySelector('#tipWrap').style='display:none';
})

document.querySelector('#tipRenew').addEventListener('click',function(e){

GM_setValue('installTime',new Date().getTime());

document.querySelector('#tipWrap').style='display:none';

window.open(_this.renewVersionUrl);

//tipIconClose.click();
})

},5000);


};

This script has been updated since the report was filed.

This script has had 5 previous upheld or fixed reports.

lazyfrog (the reported user) has made:

This report has been upheld by a moderator.

either remove all links to the external script or add @antifeature