Created
August 29, 2024 23:38
-
-
Save AJolly/ff02d798f001057fb3de8b27096a84a5 to your computer and use it in GitHub Desktop.
Amazon Bypass Need anything else? Checkout UserScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Amazon Auto Checkout | |
// @version 0.1 | |
// @description Automatically clicks the "Continue to checkout" button on Amazon cart pages | |
// @match https://www.amazon.com/cart/byc/ref=ox_sc_byg_proceed* | |
// @namespace https://gist.github.com/AJolly | |
// @author AJolly | |
// @license MIT | |
// @downloadURL https://gist.github.com/AJolly/ff02d798f001057fb3de8b27096a84a5/raw/?cache-bust=111 | |
// @updateURL https://gist.github.com/AJolly/ff02d798f001057fb3de8b27096a84a5/raw/?cache-bust=111 | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
// Function to click the "Continue to checkout" button | |
function clickCheckoutButton() { | |
const checkoutButton = document.querySelector('a[name="sc-byc-ptc-button"]'); | |
if (checkoutButton) { | |
checkoutButton.click(); | |
console.log('Auto-clicked the "Continue to checkout" button'); | |
} else { | |
console.log('Checkout button not found'); | |
} | |
} | |
// Run the function when the page is fully loaded | |
window.addEventListener('load', clickCheckoutButton); | |
// Also run the function immediately in case the page is already loaded | |
clickCheckoutButton(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment