Last active
February 12, 2026 04:11
-
-
Save westonganger/49d351fd7c6876147736a7c8fe686ab2 to your computer and use it in GitHub Desktop.
TamperMonkey - Amazon orders page grand total script
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 page total | |
| // @namespace http://tampermonkey.net/ | |
| // @version 2026-02-12 | |
| // @description try to take over the world! | |
| // @author You | |
| // @match https://www.amazon.ca/your-orders/orders* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=amazon.ca | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| 'use strict'; | |
| var prices = Array.from(document.querySelectorAll("span")) | |
| .filter(function(el){ return el.textContent.includes("Total") }) | |
| .map(function(el){ return el.parentElement.nextElementSibling.querySelector("span").textContent }) | |
| .map(function(text){ return Number(text.replace("$", "")) }); | |
| var sum = 0; | |
| prices.forEach(function(x){ | |
| sum = sum + x; | |
| }); | |
| document.querySelector('.your-orders-content-container').insertAdjacentHTML('afterbegin', `<h1>ORDER PAGE TOTAL: $${sum}</h1>`); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment