// ==UserScript==
// @name 淘宝、天猫、聚划算、京东、苏宁、唯品会、华为、耐克、魅族、联想、华硕、小米有品、考拉抢购助手v2
// @namespace Aice.Fu_gwTools
// @version 0.1.190
// @description 淘宝、天猫、聚划算、京东、苏宁、唯品会、华为、耐克、魅族、小米有品、考拉自动抢购工具,支持淘宝、天猫、聚划算、京东、苏宁易购、苏宁香港、唯品会、华为、耐克、魅族、联想、华硕、小米有品、考拉的商品页面抢购、购物车抢购,在非抢购页面支持淘宝、天猫、京东、苏宁易购隐藏优惠券领取及历史价格查看。
// @source https://greasyfork.org/zh-CN/scripts/393577
// @match *://item.taobao.com/*
// @match *://chaoshi.tmall.com/*
// @match *://chaoshi.detail.tmall.com/*
// @match *://detail.tmall.com/*
// @match *://detail.tmall.hk/*
// @match *://buy.tmall.com/order/*
// @match *://buy.taobao.com/*
// @match *://cart.tmall.com/*
// @match *://cart.taobao.com/*
// @match *://s.click.taobao.com/*
// @match *://buy.tmall.com/order/confirmOrderWap.htm*
// @match *://buy.taobao.com/auction/order/confirm_order.htm*
// @match *://buy.tmall.com/auction/order/confirm_order.htm*
// @match *://buy.tmall.hk/order/confirm_order.htm*
// @match *://buy.liangxinyao.com/order/confirm_order.htm*
// @match *://detail.liangxinyao.com/*
// @match https://cart.jd.com/*
// @match *://item.jd.com/*
// @match *://item.jd.hk/*
// @match *://i-item.jd.com/*
// @match *://npcitem.jd.hk/*
// @match https://trade.jd.com/shopping/order/*
// @match https://trade.jd.hk/shopping/order/*
// @match https://plogin.m.jd.com/*
// @match https://m.jd.com/*
// @match https://wqdeal.jd.com/*
// @match https://wqs.jd.com/*
// @match https://wq.jd.com/*
// @match https://marathon.jd.com/*
// @match https://union-click.jd.com/*
// @match https://item.yiyaojd.com/*
// @match *://product.suning.com/*
// @match https://shopping.suning.com/cart.do*
// @match https://shopping.suning.com/order.do*
// @match https://shopping.hksuning.com/*
// @match https://product.hksuning.com/*
// @match https://detail.meizu.com/item*
// @match https://ordercenter.meizu.com/order/*
// @match https://*.lenovo.com.cn/product/*
// @match https://*.lenovo.com.cn/Campaign/ProductDetails*
// @match https://buy.lenovo.com.cn/checkout/*
// @match https://www.asus.com.cn/store/product*
// @match https://www.asus.com.cn/store/checkout/*
// @match https://detail.vip.com/*
// @match https://www.vipglobal.hk/*
// @match https://cart.vip.com/*
// @match https://checkout.vip.com/*
// @match https://www.nike.com/*
// @match https://www.nike.com/cn/t/*
// @match https://www.nike.com/cn/zh-Hans/cart*
// @match https://www.nike.com/cn/checkout*
// @match https://www.vmall.com/product/*
// @match https://www.vmall.com/order/nowConfirmcart*
// @match https://www.vmall.com/cart2*
// @match https://www.vmall.com/bporder/wcart*
// @match https://m.vmall.com/order/confirm*
// @match https://www.vmall.com/order/confirmcart*
// @match https://www.vmall.com/order/rush/confirm*
// @match https://buy.vmall.com/submit_order.html*
// @match https://www.fliggy.com/*
// @match https://www.xiaomiyoupin.com/detail*
// @match https://trade.xiaomiyoupin.com/tr/checkout*
// @match *://you.163.com/item/detail*
// @match *://www.adidas.com.cn/item*
// @match *://item.gome.com.cn/*
// @match *://goods.kaola.com/*
// @match *://buy.kaola.com*/order/confirm.html*
// @match https://www.gwdang.com/trend*
// @require http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// @antifeature referral-link 【应GreasyFork代码规范要求:含有优惠券查询功能的脚本必须添加此提示!在此感谢大家的理解...】
// @grant GM_xmlhttpRequest
// @grant GM_setValue
// @grant GM_getValue
// @grant unsafeWindow
// @connect gwdang.com
// @connect ubja.vip
// @connect alicdn.com
// @connect api.m.taobao.com
// @connect jd.com
// @connect quan.suning.com
// @connect sapi.k780.com
// @connect tp.hd.mi.com
// @connect buy.vmall.com
// @connect sale.vmall.com
// @connect pinduoduo.com
// @author Aice.Fu
// @downloadURL https://update.greasyfork.icu/scripts/532884/%E6%B7%98%E5%AE%9D%E3%80%81%E5%A4%A9%E7%8C%AB%E3%80%81%E8%81%9A%E5%88%92%E7%AE%97%E3%80%81%E4%BA%AC%E4%B8%9C%E3%80%81%E8%8B%8F%E5%AE%81%E3%80%81%E5%94%AF%E5%93%81%E4%BC%9A%E3%80%81%E5%8D%8E%E4%B8%BA%E3%80%81%E8%80%90%E5%85%8B%E3%80%81%E9%AD%85%E6%97%8F%E3%80%81%E8%81%94%E6%83%B3%E3%80%81%E5%8D%8E%E7%A1%95%E3%80%81%E5%B0%8F%E7%B1%B3%E6%9C%89%E5%93%81%E3%80%81%E8%80%83%E6%8B%89%E6%8A%A2%E8%B4%AD%E5%8A%A9%E6%89%8Bv2.user.js
// @updateURL https://update.greasyfork.icu/scripts/532884/%E6%B7%98%E5%AE%9D%E3%80%81%E5%A4%A9%E7%8C%AB%E3%80%81%E8%81%9A%E5%88%92%E7%AE%97%E3%80%81%E4%BA%AC%E4%B8%9C%E3%80%81%E8%8B%8F%E5%AE%81%E3%80%81%E5%94%AF%E5%93%81%E4%BC%9A%E3%80%81%E5%8D%8E%E4%B8%BA%E3%80%81%E8%80%90%E5%85%8B%E3%80%81%E9%AD%85%E6%97%8F%E3%80%81%E8%81%94%E6%83%B3%E3%80%81%E5%8D%8E%E7%A1%95%E3%80%81%E5%B0%8F%E7%B1%B3%E6%9C%89%E5%93%81%E3%80%81%E8%80%83%E6%8B%89%E6%8A%A2%E8%B4%AD%E5%8A%A9%E6%89%8Bv2.meta.js
// ==/UserScript==
(function() {
'use strict';
var myCon = '
';
var myConSN = '';
var myConKL = '';
var myConNike = '';
var myConVip = '';
var myConJD = '';
var myConN = '
';
//var myConJDMb = ' 购物助手 By Aice.Fu 开始倒计时 开始时间 提前 ms 微信支付 京东支付 ';
var myConJDCart = '';
var myConCart = '';
var ifLj = null;
var frmId = 0;
var btnBuy = null;
var realTime;
var starttime;
var endtime;
var initsdtime_int = 0; //第一次获得的服务器时间
var thissdtime_int;
var d8;//抢购时间
var cyce = 100; // 多少毫秒点击一次
var bwtime = 100;//前置时间
var gostart = 0;
var btnCart= null;
var ifYhq = 0;
var chk = 1;
var goodsId = null;
var skuId =null;
var sjid = null ;
var goCart =0;
var goBtn = 0;//执行抢购按钮
var allck = null;//购物车全选
var ifRef = 0; //是否刷新
var mqBfTim = 3;//盲抢提前刷新时间
var qzxd = 0 //强制下单
var bttj = 0 //白条提交
var yhqid = "8391078392";
var day = new Date().getDate();
//历史价格提交参数
var pdata =null;
var pbeginTime=null;
var picdata =null;
var picdate =null;
var pdate =null;
var fm = null;
var buyTop = 1 //页面提交次数上限 不同页面提交次数不同
var cycNbr = 0 //循环次记数
var buyPl = 250//页面执行的频率
var timeUrl = null;//时间同步
var acId =null; //华为activityId
var jdjlT1 = null; //京东捡漏定时器
var jdjlcs = 0;//京东捡漏次数
var jlz = false; //京东捡漏执行标志
var uZl = true;
var zlDt = null;
var zlGid = null;
//Loading
var _PageHeight = document.documentElement.clientHeight,
_PageWidth = document.documentElement.clientWidth;
var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0,
_LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;
var _LoadingHtml = '';
var froUrl = localStorage.getItem('locUrl');
froUrl = froUrl==null?"":froUrl;
var tbHis = localStorage.getItem('tbhis');
tbHis = tbHis==null?"":tbHis;
var mqMd = GM_getValue('mqmd');
var jlMd = GM_getValue('jlmd');
if(jlMd=="undefined" | jlMd == null){
GM_setValue("jlmd",0);
}
ifRef = GM_getValue("ref");
if(ifRef==1 | ifRef == null){
GM_setValue("ref",0);
}
cyce = GM_getValue("Acyce");
if(cyce=="undefined" | cyce == null){
cyce=100;
}
cycNbr = GM_getValue("cycNbr");
if(cycNbr=="undefined" | cycNbr == null){
cycNbr=0;
}
goBtn = GM_getValue("goBtn");
if(goBtn=="undefined" | goBtn == null){
goBtn=100;
}
goCart = GM_getValue("goCart");
if(goCart=="undefined" | goCart == null){
goCart=100;
}
qzxd = GM_getValue("qzxd");
bttj = GM_getValue("bttj");
if(bttj=="undefined" | bttj == null){
bttj=0;
}
zlDt = GM_getValue("zlDt");
if(zlDt=="undefined" | zlDt == null){
zlDt=null;
}
uZl = GM_getValue("uZl");
if(uZl=="undefined" | uZl == null){
uZl=true;
}
zlGid = GM_getValue("zlGid");
if(zlGid=="undefined" | zlGid == null){
zlGid=null;
}
if (uZl==false&&(zlDt==null||new Date().getTime()-zlDt>604800000)){
uZl=true;
GM_setValue("uZl",true);
}
var AiceQqscp = document.getElementById("AiceQgscp");
if (AiceQqscp!== null && typeof(AiceQqscp) === 'object') {
$("#AiceQqscp").remove();
return;
}
if(window.location.origin == "https://detail.tmall.com" || window.location.origin == "https://chaoshi.detail.tmall.com" || window.location.origin == "https://detail.tmall.hk"||window.location.origin == "https://detail.liangxinyao.com"){
mqMd = 0;
frmId = 1;
}
if(window.location.origin == "https://item.taobao.com"){
mqMd = 0;
frmId = 2;
}
if(window.location.origin == "https://cart.taobao.com"){
//$('#J_Search').append(myConCart);
//var tbcartldiv = getTargetByTAV('div','class','tb-header-wrapper');
//tbcartldiv.id='tbcartldiv';
//$('#tbcartldiv').append(myConCart);
$('#J_SiteNavBdR').append(myConCart);
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
frmId = 3;
InitFunc();
}
if(window.location.origin == "https://cart.tmall.com"){
//$('#mallSearch').append(myConCart);
//var tmalldiv = getTargetByTAV('div','class','headerCon ');
//if (tmalldiv == null || typeof(tmalldiv) != 'object') {
//tmalldiv = getTargetById('J_SiteNavBd');
//}
//tmalldiv.id='tmalldiv';
//$('#tmalldiv').append(myConCart);
$('#J_SiteNavBdR').append(myConCart);
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
frmId = 4;
InitFunc();
}
if(window.location.origin == "https://item.jd.com"||window.location.origin == "https://item.jd.hk"||window.location.origin == "https://npcitem.jd.hk"||window.location.origin == "https://i-item.jd.com"||window.location.origin == "https://item.yiyaojd.com"){
if (getTargetById('choose-btns')!== null && typeof(getTargetById('choose-btns')) === 'object'){
$('#choose-btns').append(myConJD);
}else if (getTargetById('itemover')!== null && typeof(getTargetById('itemover')) === 'object'){
$('#itemover').append(myConJD);}
else{$('#crumb-wrap').append(myConJD); $('#AiceQgscp').hide(); }
//$('#choose-btns').append(myConJD);
goodsId= /(\d+)\.html/.exec(window.location.href)[1] ;
//QRcode(goodsId,2);
var purl = /item\..*?jd\.(?:[^./]+)\/(\d+)\.html/.exec(window.location.href);
if(window.location.href.indexOf('utm_source=')!=-1){
GM_setValue("zlGid",goodsId);
var nzlDt = new Date().getTime();
GM_setValue("zlDt",nzlDt);
if (zlGid!=null&&zlGid==goodsId&&zlDt!=null&&nzlDt-zlDt<4000){
GM_setValue("uZl",false);
uZl=false;
}
}
if (purl != null && ((window.location.href.indexOf('?bbtf')!=-1)||(window.location.href.indexOf('?')==-1))&&(window.location.href!=froUrl)&&uZl) {
getYhqurl(goodsId,"",2,2);
}
if (window.location.href.indexOf('ubja')!=-1){
history.pushState(null,null,goodsId+'.html')
}
if (qzxd==0){
getTargetById("AiceQxd").checked = false;
}else{
getTargetById("AiceQxd").checked = true;
}
if (bttj==0){
getTargetById("AiceBt").checked = false;
}else{
getTargetById("AiceBt").checked = true;
}
GM_setValue("goodsId","0");
GM_setValue("cycNbr","0");
GM_setValue("AutoSubOdr",0)
if (getTargetById("AiceQxd").checked){
getTargetById("AiceQxda").href="https://wqs.jd.com/order/s_confirm_miao.shtml?sceneval=2&scene=jd&isCanEdit=1&commlist=,,1,"+ goodsId;
btnBuy= getTargetById("AiceQxda");
GM_setValue("qzxd",0);
buyTop = 10;
buyPl = 250;
}else{
// iphoneX 抢购
if (getTargetById("choose-btn-ko")!== null && typeof(getTargetById('btn-choose-btn-ko')) === 'object') {
console.log("(++++++++++++iphoneX 抢购");
var sku = window.location.pathname.replace(/[^0-9]/ig, "");
var ref = "//cart.jd.com/gate.action?pid=" + sku + "&pcount=1&ptype=1";
console.log("https:" + ref);
btnBuy = document.getElementById("choose-btn-ko");
btnBuy.href = ref;
}
//预约抢购
if (getTargetById("btn-reservation")!== null && typeof(getTargetById('btn-reservation')) === 'object') {
console.log("(++++++++++++正在预约抢购");
var aText =getTargetById("btn-reservation").innerText;
if (aText.indexOf("定金")!=-1){
btnBuy = document.getElementById("btn-reservation");
}
}
//秒杀
if (getTargetById('InitCartUrl')!== null && typeof(getTargetById('InitCartUrl')) === 'object') {
console.log("(++++++++++++正在秒杀");
btnBuy = document.getElementById("InitCartUrl");
}
if (btnBuy !== null && typeof(btnBuy) === 'object') {
buyTop = 3;
buyPl = 500;
}else{
buyTop = 200;
buyPl = 100;
}
}
mqMd = 0;
frmId = 5;
InitFunc();
}
if(window.location.origin == "https://cart.jd.com"){
if(window.location.href.indexOf('https://cart.jd.com/addToCart.html')!=-1){
//去购物车结算
if (getTargetById("GotoShoppingCart")!== null && typeof(getTargetById('GotoShoppingCart')) === 'object'){
console.log("(++++++++++++正在去购物车结算");
btnBuy = getTargetById("GotoShoppingCart");
btnBuy.click();
}
return;
}
var Search = getTargetByTAV('div','class','w w1 header clearfix');
Search.id = "AiceSearch"
$('#AiceSearch').append(myConJDCart);
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
frmId = 6;
InitFunc();
}
if(window.location.origin == "https://product.suning.com"){
goodsId= /(\d+)\.html/.exec(window.location.href)[1];
sjid = /(\d+)/.exec(window.location.href)[1];
var snDiv = getTargetByTAV('div','class','mainbtns clearfix');
snDiv.id = "AiceDiv"
$('#AiceDiv').append(myConSN);
if ((window.location.href.indexOf('utm_source=union')==-1)&&window.location.href!=froUrl) {
setTimeout(() =>{getYhqurl(goodsId,sjid,4,2);}, 200);
}
if (window.location.href.indexOf('ubja')){
history.pushState(null,null,window.location.origin+'/'+sjid+'/'+goodsId+'.html')
}
btnBuy =getTargetById('buyNowAddCart');
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 7;
InitFunc();
}
if(window.location.origin == "https://product.hksuning.com"){
goodsId= /(\d+)\.html/.exec(window.location.href)[1];
sjid = /(\d+)/.exec(window.location.href)[1];
var snhkDiv = getTargetByTAV('div','class','main-btns');
snhkDiv.id = "AiceDiv"
$('#AiceDiv').append(myConSN);
btnBuy =getTargetByTAV('li','class','btn-dark-buy');
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 7;
InitFunc();
}
if(window.location.origin == "https://shopping.suning.com" && window.location.href.indexOf('cart.do')!=-1 ){
var SearchSn = getTargetByTAV('div','class','cart-search');
SearchSn.id = "AiceSearch"
$('#AiceSearch').append(myConCart);
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
frmId = 8;
InitFunc();
}
if(window.location.origin == "https://shopping.hksuning.com" && window.location.href.indexOf('cart1')!=-1){
var SearchSnhk = getTargetByTAV('div','class','ng-header-box');
SearchSnhk.id = "AiceSearch"
$('#AiceSearch').append(myConCart);
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
frmId = 8;
InitFunc();
}
if(window.location.origin == "https://wqdeal.jd.com" || window.location.origin == "https://wqs.jd.com"|| window.location.origin == "https://wq.jd.com" ){
mqMd = 0;
frmId = 9;
InitFunc();
}
if (window.location.href.indexOf("https://buy.tmall.com/order/confirmOrderWap.htm")!=-1){
jlMd = 0;
mqMd = 0;
frmId = 10;
InitFunc();
}
if(window.location.href.indexOf("https://detail.meizu.com/item")!=-1){
var mezuJp = getTargetById('J_prodService');
var mezuJpDiv = null;
if (mezuJp !== null && typeof(mezuJp) === 'object') {
mezuJpDiv =mezuJp.outerHTML;
mezuJp.style.display='None';
}
var mzDiv = getTargetByTAV('div','class','property-buy');//property-buy
mzDiv.id = "AiceDiv"
$('#AiceDiv').append(myConSN);
if (mezuJpDiv !== null){
$('#AiceDiv').append(mezuJpDiv);
}
btnBuy =getTargetById('J_btnBuy');
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 11;
InitFunc();
}
if((window.location.href.indexOf("lenovo.com.cn/product")!=-1)||(window.location.href.indexOf("lenovo.com.cn/Campaign/ProductDetails")!=-1)){
var lxDiv = getTargetById('detail_right');
if (lxDiv !== null && typeof(lxDiv) === 'object') {
}else
{
lxDiv = getTargetById('productDetailMsg');
}
lxDiv.id = "AiceDiv"
$('#AiceDiv').append(myConSN);
if (window.location.href!=froUrl&&window.location.href.indexOf("?pmf_source")==-1&&window.location.href.indexOf("duomai_")==-1) {
getYhqurl(window.location.href,"",7,2);
}
btnBuy =getTargetById('ljgm');
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 12;
InitFunc();
}
if(window.location.href.indexOf("asus.com.cn/store/product")!=-1){
var hsDiv = getTargetByTAV('div','class','product-action');
if (hsDiv !== null && typeof(hsDiv) === 'object') {
}else{
hsDiv = getTargetByTAV('div','class','optional_attributes');
if (hsDiv !== null && typeof(hsDiv) === 'object') {
}else{hsDiv = getTargetByTAV('div','class','purchase_quantity_item');}
}
hsDiv.id = "AiceDiv"
$('#AiceDiv').append(myConSN);
btnBuy =getTargetByTAV('button','class','btn btn-import btn-huge action-buynow');
if (btnBuy !== null && typeof(btnBuy) === 'object') {
}else{btnBuy =getTargetByTAV('button','class','now_buy solid_button');}
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 13;
InitFunc();
}
if(window.location.origin == "https://detail.vip.com"||window.location.origin == "https://www.vipglobal.hk"){
goodsId= /(\d+)\.html/.exec(window.location.href)[1];
var vipDiv = getTargetByTAV('div','class','product-content-inner clearfix hasPanelView');
vipDiv.id = "AiceDiv"
$('#AiceDiv').append(myConVip);
if ((window.location.href.indexOf('t.vip.com')==-1)&&window.location.href!=froUrl) {
//getYhqurl(goodsId,'',5,2);
setTimeout(() =>{getYhqurl(goodsId,'',5,2); }, 500);
}
btnBuy =getTargetById('J-cartAdd-submit');
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 14;
InitFunc();
}
if(window.location.origin == "https://cart.vip.com"){
var vipSearch = getTargetByTAV('div','class','cart-tab');
vipSearch.id = "AiceSearch"
$('#AiceSearch').append(''+myConJDCart+"
");
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
frmId = 15;
InitFunc();
}
//if(window.location.href.indexOf("nike.com/cn/t")!=-1){
if((window.location.href.indexOf("www.nike.com")!=-1)&&(window.location.href.indexOf("car")==-1)){
GM_setValue("goCart",0);//避免影响正常下单
$("body").append(myConN);
if (window.location.href!=froUrl&&window.location.href.indexOf("site_id=39341")==-1&&window.location.href.indexOf("duomai_")==-1) {
getYhqurl("https//www.nike.com/w/","",7,2);
}
GM_setValue("cycNbr","0");
frmId = 16;
InitFunc();
}
if(window.location.href.indexOf("nike.com/cn/zh-Hans/cart")!=-1){
GM_setValue("goCart",0);//避免影响正常下单
if(goCart==1){
setInterval(() => {
var nikeJs = getTargetByTAV('button','class','css-1lkcnio e16pwdtm0');
if (nikeJs !== null && typeof(nikeJs) === 'object') {
nikeJs.click();
}else{}
},1000);
}
frmId = 17;
InitFunc();
}
if(window.location.href.indexOf("https://www.vmall.com/product")!=-1){
var eHgd = /(\d+)\.html/.exec(window.location.href);
if(eHgd==null)
{
goodsId= /prdId=(\d+)/.exec(window.location.href)[1];
frmId = 1818;
var hwConIl=setTimeout(() => {
var hwdiv = getTargetById('product-operation');
if (hwdiv == null || typeof(hwdiv) != 'object') {
hwdiv = getTargetByTAV('div','class','css-1dbjc4n r-14lw9ot r-11wrixw');
}
if (hwdiv != null && typeof(hwdiv) == 'object') {
hwdiv.id="hwdiv";
$('#hwdiv').append(myCon);
if (qzxd==0){
getTargetById("AiceQxd").checked = false;
}else{
getTargetById("AiceQxd").checked = true;
}
//loadDivInit();
InitFunc();
if (btnBuy == null || typeof(btnBuy) != 'object') {
btnBuy =getTargetById('prd-botnav-rightbtn');
}
//clearInterval(hwConIl);
}
},1000);
}else
{
goodsId= eHgd[1];
$('#product-operation').append(myCon);
if (qzxd==0){
getTargetById("AiceQxd").checked = false;
}else{
getTargetById("AiceQxd").checked = true;
}
frmId = 18;
InitFunc();
}
//$('#product-operation').append(myConSN);
//$('#product-operation').append(myCon);
///////////////////HUAWEI Mate 40 专用//////////////////////////
if(goodsId =='10086726905036'||goodsId =='10086368169358'||goodsId =='10086375798519'||goodsId =='10086537361084'){
$('#AiceQgscp').append('Mate40专抢 ');
var actUrl = null;
if(goodsId =='10086726905036'){
actUrl="https://sale.vmall.com/rush/m40pptcsx.html?mainSku="+goodsId
}else if(goodsId =='10086368169358'){
actUrl="https://sale.vmall.com/rush/m40ptcsx.html?mainSku="+goodsId
}else if(goodsId =='10086375798519'){
actUrl="https://sale.vmall.com/rush/m40ppptcsx.html?mainSku="+goodsId
}else if(goodsId =='10086537361084'){
actUrl="https://sale.vmall.com/rush/matex2lscc.html?mainSku="+goodsId
$('#AiceHwMate40Pro').prop('lastChild').nodeValue="Mate X2专抢";
}
if (actUrl != null){
GM_xmlhttpRequest({
url: actUrl ,
method: 'GET',
timeout: 10000,
headers: {
'Content-Type':'application/x-www-form-urlencoded'
},
onload: function(responseDetails)
{
acId = /ec.activityId = (\d+);/.exec(responseDetails.responseText)[1]
}
});
var tjMate40Pro = document.getElementById('AiceHwMate40Pro');
tjMate40Pro.addEventListener('click', function() {
GM_setValue("AutoSubOdr",1);
GM_setValue("goBtn",1)
qxdHwMate40Pro();
});
}
}
/////////////////////////////////////////////////////////////////////
setTimeout(() => {
btnBuy =getTargetByTAV('a','class','product-button02 product-agreement-style');
if (btnBuy !== null && typeof(btnBuy) === 'object' &&(btnBuy.style.display!="none") ) {}
else{
btnBuy =getTargetByTAV('span','class','product-button02 product-agreement-style');
if (btnBuy !== null && typeof(btnBuy) === 'object' &&(btnBuy.style.display!="none") ) {}
else{
btnBuy =getTargetByTAV('a','class','product-button02');
if (btnBuy !== null && typeof(btnBuy) === 'object' &&(btnBuy.style.display!="none") ) {}
else{
//btnBuy=getTargetById("pro-operation").lastChild;
btnBuy= getTargetByTAV('div','class','product-button clearfix');
if (btnBuy !== null && typeof(btnBuy) === 'object')
{
btnBuy =getTargetByTAV('div','class','product-button clearfix').lastChild;
}
}
}
}
},1000);
if (window.location.href!=froUrl&&window.location.href.indexOf("?cid=")==-1&&window.location.href.indexOf("duomai_")==-1) {
getYhqurl(window.location.href,"",7,2);
}
GM_setValue("goodsId","0");
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
//frmId = 18;
}
if(window.location.href.indexOf("www.fliggy.com")!=-1){ //飞猪预留
$("body").append(myConN);
if (window.location.href!=froUrl&&window.location.href.indexOf('mm_'+yhqid)==-1) {
getYhqurl("fz","",6,2);
}
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 19;
InitFunc();
}
if(window.location.href.indexOf("https://www.vmall.com/cart2")!=-1 || window.location.href.indexOf("https://www.vmall.com/bporder/wcart")!=-1){ //华为购物车处理
var goVmCar=GM_getValue("goVmCart");
GM_setValue("goVmCart",0);//避免影响正常下单
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 20;
if (goVmCar==1){
var tVm1Cys = GM_getValue("cycNbr");
var tVm1 = setInterval(function() {
if ($("#ecBoxID")) {
$("#ecBoxID").remove();
}
var nhwjs =getTargetByTAV('a','class','box-ok');
if (nhwjs !== null && typeof(nhwjs) === 'object') {
nhwjs.click();
}
if (tVm1Cys>=10){
clearInterval(tVm1);
GM_setValue("cycNbr","0");
}
btnBuy =getTargetByTAV('div','class','sc-total-btn ').lastChild;
if (btnBuy !== null && typeof(btnBuy) === 'object') {
if (btnBuy.style.display!=null && typeof(btnBuy.style.display)=== 'object' &&btnBuy.style.display=="none"){
}else{
btnBuy.click();
tVm1Cys++;
}
}else{
btnBuy =getTargetByTAV('div','class','css-1dbjc4n r-1awozwy r-11k0qam r-17gur6a r-1loqt21 r-uvuy5l r-1777fci r-wskq1e r-1otgn73');
if (btnBuy !== null && typeof(btnBuy) === 'object') {
btnBuy.click();
tVm1Cys++;
}
}
},cyce);
}
InitFunc();
}
if (window.location.href.indexOf("https://m.vmall.com/order/confirm")!=-1){
$("body").append(myConN);
if (window.location.href!=froUrl&&window.location.href.indexOf("?cid=")==-1&&window.location.href.indexOf("duomai_")==-1) {
getYhqurl(window.location.origin +"/index.html","",7,2);
}
jlMd = 0;
mqMd = 0;
frmId = 21;
InitFunc();
}
if(window.location.href.indexOf("https://www.xiaomiyoupin.com/detail")!=-1){
goodsId= /gid=(\d+)\&/.exec(window.location.href)[1];
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 22;
}
if((window.location.href.indexOf("you.163.com")!=-1)&&(window.location.href.indexOf("car")==-1)){ //待补充
$("body").append(myConN);
if (window.location.href!=froUrl&&window.location.href.indexOf("site_id=39341")==-1&&window.location.href.indexOf("duomai_")==-1) {
getYhqurl(window.location.href,"",7,2);
}
frmId = 23;
InitFunc();
}
if((window.location.href.indexOf("www.adidas.com.cn")!=-1)&&(window.location.href.indexOf("shoppingcart")==-1)){ //待补充
$("body").append(myConN);
if (window.location.href!=froUrl&&window.location.href.indexOf("site_id=39341")==-1&&window.location.href.indexOf("duomai_")==-1) {
getYhqurl(window.location.href,"",7,2);
}
frmId = 24;
InitFunc();
}
if(window.location.href.indexOf("item.gome.com.cn")!=-1){ //待补充
$("body").append(myConN);
if (window.location.href!=froUrl&&window.location.href.indexOf("sid=106")==-1&&window.location.href.indexOf("duomai_")==-1) {
getYhqurl(window.location.href,"",7,2);
}
frmId = 25;
InitFunc();
}
if((window.location.href.indexOf("goods.kaola.com/product")!=-1)||(window.location.href.indexOf("goods.kaola.com.hk/product")!=-1)){
goodsId= /(\d+)\.html/.exec(window.location.href)[1];
$('#comboRecbox').append(myConKL);
if (window.location.href!=froUrl) {
getYhqurl(goodsId,'',9,2);
}
GM_setValue("cycNbr","0");
buyTop = 1;
buyPl = 500;
mqMd = 0;
frmId = 26;
InitFunc();
}
if (window.location.href.indexOf("https://www.gwdang.com/trend/")!=-1&&window.location.href.indexOf("-3.html")!=-1){
$(document).find("body").append("");
}
var ckhtml="";
if(window.location.origin == "https://s.click.taobao.com"||window.location.origin == "https://union-click.jd.com"){
ckhtml=$(":root").html().replace("top.location","self.location");
var czz = /
${sBody}