Skip to content

Instantly share code, notes, and snippets.

@AJolly
Created August 29, 2024 23:38
Show Gist options
  • Save AJolly/ff02d798f001057fb3de8b27096a84a5 to your computer and use it in GitHub Desktop.
Save AJolly/ff02d798f001057fb3de8b27096a84a5 to your computer and use it in GitHub Desktop.
Amazon Bypass Need anything else? Checkout UserScript
// ==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