NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript==
// @name jd抢购
// @namespace http://tampermonkey.net/
// @version 0.1
// @description jd购物车下单结算
// @author async_cao
// @match *://cart.jd.com/*
// @match *://trade.jd.com/shopping/order/*
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
let clickTime;
// 购物车自动去结算
if(location.hostname == 'cart.jd.com') {
clickTime = window.prompt('🙊yo man! 输入秒杀时间🚀 格式如: 2018-08-15T00:00:00');
const time1 = setInterval(() => {
const gap = new Date() - new Date(clickTime);
console.log(`/---------- 正在倒计时: 还有 ${-Math.floor(gap/(1000 * 60))} 分钟,开始点击----------/`);
if(gap >= 0) {
document.getElementsByClassName('submit-btn')[0].click();
}
}, 100);
}
// 自动提交订单
if(location.hostname == 'trade.jd.com') {
const time2 = setInterval(() => {
const btn = document.getElementById('order-submit');
if(btn) {
btn.click();
}
}, 100);
}
})();