Skip to content

Instantly share code, notes, and snippets.

View HoraceShmorace's full-sized avatar

Horace Nelson HoraceShmorace

View GitHub Profile
@HoraceShmorace
HoraceShmorace / auto-order-amazon-fresh.js
Last active April 14, 2020 19:52 — forked from scarrillo/amazon-delivery-slots.js
Amazon.com: Check for delivery slots for Fresh and Whole Foods
const ALLOW_AUTO_PURCHASE = false
const CHECKOUT_URL = 'https://www.amazon.com/gp/buy/shipoptionselect/handlers/display.html?hasWorkingJavascript=1'
const { pathname } = location
const isShipOptionPage = /buy\/shipoptionselect/.test(pathname)
const isPaySelectPage = /buy\/payselect/.test(pathname)
const isPurchasePage = /buy\/spc/.test(pathname)
const isThankYouPage = /buy\/thankyou/.test(pathname)
let attemptNum = 1