Dyskusje » Tworzenie skryptów

各位大神看看抢疫苗的代码是不是正确的,能不能运行???十分感谢各位大神!!

§
Napisano: 13-02-2022

// ==UserScript==
// @name 知苗抢票
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 一个在知苗上抢票的小助手
// @author sfdye
// @match #小程序://知苗易约/首页/KNeKNPsfxPd3vyF
// @grant none
// ==/UserScript==

// 设置抢票张数

const ticAmount = 8;

// 设置抢票区域
const section = "B";

(function() {
'use strict';

var areaObj = getAreaBySec(section);

if (areaObj) {
// 设置区域
jQuery('div#section-sel').html('YOUR PREFERRED SECTION IS '+ areaObj.description.replace(/ *\<[^)]*\> */g, "") + '');
assignPrice(areaObj);
}

var ticQuantity = document.getElementById("qty_0");
// 设置张数
if (ticQuantity) ticQuantity.value = ticAmount;

var capKey = document.getElementById("capKey");
if (capKey) capKey.focus();

var addtocart = document.getElementById("addtocart-btn");
if (addtocart) {
// 提交
addtocart.click();
}

})();

Odpowiedz

Zaloguj się, by odpowiedzieć.