Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pacoespinoza/e8f5759eb28a2c47f10455665aa0379d to your computer and use it in GitHub Desktop.
Save pacoespinoza/e8f5759eb28a2c47f10455665aa0379d to your computer and use it in GitHub Desktop.
Removes all Amazon saved for later items on the cart page. It will only remove visible items. You might want to scroll first to make more items visible. To use paste code in developer console (Ctrl+Shift+J or Cmd+Opt+J in Chrome) then press enter.
function moveToWishList() {
var query = document.querySelectorAll("#sc-saved-cart input[value='Mover a la Wish List']")
if (query.length) {
query[0].click();
}
var query2 = document.querySelectorAll("#registry-2STN5ENQWOZ8J a")
if (query2.length) {
query2[0].click();
}
if (query.length > 1) {
setTimeout(moveToWishList,5000);
}
else {
console.log('Finished');
}
}
moveToWishList();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment