NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name Cost per share // @namespace torn // @version 0.2 // @description $ per share sold // @author Ahab [1735214] // @match *www.torn.com/events.php* // @license MIT // @require https://greasyfork.org/scripts/5392-waitforkeyelements/code/WaitForKeyElements.js?version=115012 // ==/UserScript== function stock_event () { $(document).ready(function() { $.each($("span[class^='mail-link']"), function(index , value){ if(value.innerHTML.split(" ")[1] == "shares"){ var a = value.innerHTML.split(" ")[8].split("$")[1].replace(/,/g, '') /value.innerHTML.split(" ")[0].replace(/,/g, ''); $("span[class^='mail-link']")[index].append(' Shares sold for $',a,' each') //accurate //$("span[class^='mail-link']")[index].append(' Shares sold for $',Intl.NumberFormat('en-US').format(a),' each') //bit off } }) }) } waitForKeyElements("div.mailbox-container", stock_event);