Skip to content

Instantly share code, notes, and snippets.

A simple developer console script to add all the items in an Amazon Wish List to the Amazon Cart.
You will need to allow popups for this script to work, all items will be opened in new tabs.
--------------------------------------------------------------------------------------------------
var elements = document.getElementsByClassName('a-button-text'); // Get all the buttons on the page (Probably overkill)
var filteredEle = []; // Will be used to store the "Add to Cart" buttons
for (let i = 0; i < elements.length; i++) {
if (elements[i].textContent === 'Add to Cart') { // Find the elements that say "Add to Cart"
filteredEle.push(elements[i]); // Put them in their list
@kminardo
kminardo / gist:d036ad3e6e44d16ae3b7
Last active November 19, 2015 02:44
Small snippet of useful code
var cases, delegator;
// Example returns for illustration only.
cases = {
alpha: function() {
// statements
// a return
return [ "Alpha", arguments.length ];
},
beta: function() {
@kminardo
kminardo / gist:538d4306b09a34997647
Created October 31, 2015 21:18
Arduino Pumpkin
#include <IRremote.h>
#include <IRremoteInt.h>
// Display Colors
#define RED 1
#define GREEN 2
#define BLUE 3
#define YELLOW 4
#define CYAN 5
#define MAGENTA 6