Skip to content

Instantly share code, notes, and snippets.

View antoni-g's full-sized avatar
🙃
‌‌ ‌‌ ‌‌ ‌‌ ‌‌

Antoni Gierczak antoni-g

🙃
‌‌ ‌‌ ‌‌ ‌‌ ‌‌
  • Comcast
  • Philadelphia
View GitHub Profile
@antoni-g
antoni-g / bb.js
Last active May 5, 2022 06:04
Best Buy add to cart
let added = false
let carting = false
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function waitForButton() {
if (document.getElementsByClassName("go-to-cart-button")[0]) {
document.getElementsByClassName("go-to-cart-button")[0].childNodes[0].click()
carting = true