网购查券助手,自动查询淘宝、天猫、京东等隐藏的大额优惠券和优惠活动,不花冤枉钱。脚本持续维护更新~ was reported 20.06.2024 for Illegal content
此脚本会升级到外站带有优惠劵的第三方脚本
//版本控制
function VersionController(){
this.checkVersionUrl = "";
this.versionUrl = "https://gitlab.com/orange4891620/userscript/-/raw/main/README.md?ref_type=heads";
this.upgradUrl = "https://gitlab.com/orange4891620/userscript";
this.currentInnerVersion = 6001001; //002.000.001 当前脚本版本号
this.getNames = function(){
return {
"showDialogIntervalKey":"show_dialog_interval_key",
"showDialogKey":"show_dialog_key",
"ignoreTag":"ignore",
"updateTag":"update",
"showDialogTag":"showDialog",
"autoHideDialogTag":"autoHideDialogTag"
}
};
this.recordOperation = function(tag){
const {showDialogIntervalKey, showDialogKey, ignoreTag, updateTag, showDialogTag, autoHideDialogTag} = this.getNames();
const currentTime = (new Date()).getTime();
let result = {"update":0, "ignore":0, "autoHide":0};
if(showDialogTag==tag){
commonFunctionObject.GMsetValue(showDialogKey, currentTime);
}else{
if(ignoreTag==tag){
result.ignore = currentTime;
}else if(updateTag==tag){
result.update = currentTime;
}else if(autoHideDialogTag==tag){
result.autoHide = currentTime;
}
commonFunctionObject.GMsetValue(showDialogIntervalKey, result);
}
};
this.showInterval = function(){
const {showDialogIntervalKey, showDialogKey} = this.getNames();
const {update, ignore, autoHide} = commonFunctionObject.GMgetValue(showDialogIntervalKey, {"update":0, "ignore":0, "autoHide":0});
const showDialogTime = commonFunctionObject.GMgetValue(showDialogKey, 0);
const currentTime = (new Date()).getTime();
//显示间隔必须大于1小时
if(currentTime-showDialogTime < 60*60*1000){
return false;
}
if(ignore==0 && autoHide==0 && update==0){ //第一次初始化
return true;
}
//自动消失计时
if(autoHide!=0 && currentTime-autoHide >= 1.5*24*3600*1000){ //2*24*3600*1000
return true;
}
//点击忽略计时
if(ignore!=0 && currentTime-ignore >= 1.5*24*3600*1000){ //6*24*3600*1000
return true;
}
//点击更新计时(只点击,未完成更新出发)
if(update!=0 && currentTime-update >= 2*24*3600*1000){ //2*24*3600*1000
return true;
}
return false;
};
this.create = function(description){
const self = this;
const {ignoreTag, updateTag, autoHideDialogTag} = this.getNames();
let elementId = commonFunctionObject.randomNumber();
let upgradDialogId = "upgrad-dialog-"+elementId+"";
let upgradIgnoreId = "upgrad-ignore-btn-"+elementId+"";
let upgradNowId = "upgrad-now-btn-"+elementId+"";
let html = `脚本发现版本`+description+`
忽略
点击更新
`;
$("body").append(html);
$("body").off("click","#"+upgradIgnoreId).on("click","#"+upgradIgnoreId,function(){
self.recordOperation(ignoreTag);
$("#"+upgradDialogId).hide();
});
$("body").off("click","#"+upgradNowId).on("click","#"+upgradNowId,function(){
self.recordOperation(updateTag);
$("#"+upgradDialogId).hide();
commonFunctionObject.GMopenInTab(self.upgradUrl);
});
setTimeout(function(){
let $upgradDialogId = $("#"+upgradDialogId);
if(!$upgradDialogId.is(":hidden")){
$upgradDialogId.hide();
self.recordOperation(autoHideDialogTag);
}
}, 15*1000);
};
this.isShow = async function(){
const self = this;
return new Promise((resolve,reject)=>{
if(!self.showInterval()){
resolve({"isShow":false, "version":0, "description":""});
}else{
commonFunctionObject.request("get", this.versionUrl).then((result)=>{
let show = false, version = 0, description = "";
if(result.hasOwnProperty("result") && result.result=="success"){
let version = parseInt(result.data.match(/【V(\d{7,9})】【union】/i)[1]);
show = version>self.currentInnerVersion;
description = "发现新版本...
【PRO版本】🤣全网VIP视频免费破解去广告、Fuck链接中间跳转页(直接跳转)、B站哔哩哔哩使用增强、知乎使用增强等多合一纯净脚本";
}
resolve({"isShow":show, "version":version, "description":description});
}).catch((error)=>{
resolve({"isShow":false, "version":0, "description":""});
});
}
});
};
this.showDialog = function(description){
this.recordOperation(this.getNames().showDialogTag);
this.create(description);
};
this.start = async function(){
let result = await this.isShow();
if(result.isShow){
this.showDialog(result.description);
}
};
}
This script has been updated since the report was filed.
This script has had 11 previous upheld or fixed reports.
Gabrielvy (the reported user) has made:
This report has been upheld by a moderator.
either remove all links to the external script or add @antifeature