Skip to content

Instantly share code, notes, and snippets.

@Samg381
Last active November 16, 2024 17:36
Show Gist options
  • Save Samg381/22dda7cc5e09c7b8080ddbf6b118a98a to your computer and use it in GitHub Desktop.
Save Samg381/22dda7cc5e09c7b8080ddbf6b118a98a to your computer and use it in GitHub Desktop.
Reminds users to check their Amazon shipping address before purchasing. Useful for parents, the elderly, or the generally forgetful.
// ==UserScript==
// @name Amazon Shipping Address Warning
// @namespace http://samg381.com
// @version 1.3
// @description Remind users to check their Amazon shipping address before purchasing.
// @author Samg381
// @run-at document-idle
// @match https://www.amazon.com/*
// @grant none
// @require
// @noframes
// @downloadURL https://gist.github.com/Samg381/22dda7cc5e09c7b8080ddbf6b118a98a/raw/1432803ff4065a7209844644baa8f978dec3c28e/AmazonShippingAddressWarning.user.js
// @updateURL https://gist.github.com/Samg381/22dda7cc5e09c7b8080ddbf6b118a98a/raw/1432803ff4065a7209844644baa8f978dec3c28e/AmazonShippingAddressWarning.user.js
// ==/UserScript==
(function() {
var shipAddrDiv = document.getElementById('checkout-deliveryAddressPanel');
if ( shipAddrDiv ){
setInterval(blink, 1000);
alert("Check shipping address!");
}
function blink() {
shipAddrDiv.style.background = (shipAddrDiv.style.background == '#ffe300' ? '' : '#ffe300');
setTimeout(function() {
shipAddrDiv.style.background = (shipAddrDiv.style.background == 'white' ? '' : 'white');
}, 500);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment