NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Amazon.de price shaming // @namespace Violentmonkey Scripts // @match https://www.amazon.de/* // @grant none // @license MIT // @version 1.0 // @author - // @description 4/30/2021, 3:43:10 PM // ==/UserScript== /////////////////////////////// ////💸SET MY VALUE PLEASE💸//// /////////////////////////////// const hourlyWage = null; /////////////////////////////// ////💸SET MY VALUE PLEASE💸//// /////////////////////////////// if (!hourlyWage) { console.log(`/////////////////////////////// ////💸DID U SET IT THOUGH💸//// /////////////////////////////// `); } const element = (document.querySelector('#priceblock_ourprice') || document.querySelector('#priceblock_pospromoprice')); if (!element) { console.log(`/////////////////////////////// ////I CANT FIND ANYTHING AAA//// /////////////////////////////// `); return; } const priceString = element.textContent; const price = Number(priceString.replace('.', '').replace(',', '.').split(' €')[0]); const hoursOfWork = (price / hourlyWage).toFixed(2); const newElement = document.createElement('span'); newElement.textContent = ` (${hoursOfWork} hours of your life)`; newElement.style.fontSize = "11px"; newElement.style.opacity = 0.85; if (hoursOfWork && !Number.isNaN(hoursOfWork)) { element.appendChild(newElement); }