淘宝抢购脚本 JS 代码搭配 Tampermoneky 刷新抢购
var t=setInterval(selectIteam,100);
// 需要选择的尺码、颜色或种类
var IteamInfoArray=['20509:28315','1627207:4388226359'];
function selectIteam(){
var allSelect=true;
//console.log(IteamInfoArray.length);
for(var i=0; i<IteamInfoArray.length; i++){if ( $("li[data-value='"+IteamInfoArray[i]+"']").attr("class")!="tb-selected"){$("li[data-value='"+IteamInfoArray[i]+"']").click();
console.log("选择第"+i+"个");
allSelect=false;
}
}
if(allSelect){clearInterval(t);
setTimeout(sumbits,100);
}
}
function sumbits(){document.getElementById("J_juValid").getElementsByTagName("div")[0].getElementsByTagName("a")[0].click();
console.log("已提交");
}
正文完