-
-
Save jinscoe-zz/4520211 to your computer and use it in GitHub Desktop.
Made the original script into a user script to be used with GreaseMonkey or Tamper monkey. Remove the alert. Instead this outputs the total at the top of the list along side the list controls.
This file contains hidden or 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 Total Cost of Wishlist | |
// @namespace http://www.amazon.com/registry/wishlist/ | |
// @version 0.1 | |
// @description Total cost of amazon wishlist | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js | |
// @match http://www.amazon.com/registry/wishlist/* | |
// @match http://www.amazon.com/gp/wishlist/* | |
// @copyright 2012+, Jack | |
// ==/UserScript== | |
var list = $("#item-page-wrapper .list-items table tbody .lineItemMainInfo .lineItemPart strong"); | |
var total=0; | |
for(i=0; i<list.length;i++){ | |
total += parseFloat(list[i].innerText.replace("$","")); | |
} | |
$("span#printThisList").after(list.length+" items for a total of: $"+total.toFixed(2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment