【发布时间】:2017-12-05 06:26:28
【问题描述】:
我正在尝试让 Tampermonkey 填写在线表格。 它每 4 次就有 1 次有效,我想要它做的只是在 bigcartel 商店进行简单的结帐过程。有人可以帮忙吗?
它应该适用于使用他们平台的任何商店,因为它们都很通用,即http://groundup.bigcartel.com
我的代码;
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include https://checkout.bigcartel.com/*
// @include https://*.bigcartel.com/product
// @include https://*.bigcartel.com/cart
// @grant none
// ==/UserScript==
// on "/cart" page click checkout button
document.getElementByName("checkout").click();
// fill first three form fields
document.getElementById("buyer_first_name").value = "John";
document.getElementById("buyer_last_name").value = "Smith";
document.getElementById("buyer_email").value = "john@doe.com";
// click "next" button
document.getElementByType("submit").click();
【问题讨论】: