Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Neopets - Max Bank Goal
- // @version 2020.12.30
- // @description Displays how many more NP you need to reach max bank (2,147,483,647)
- // @author Daino
- // @include http*://www.neopets.com/market.phtml?type=till
- // @include http*://www.neopets.com/bank.phtml*
- // @grant GM_getValue
- // @grant GM_setValue
- // ==/UserScript==
- (function() {
- 'use strict';
- const balanceElem = document.getElementById("txtCurrentBalance1");
- const balanceStr = balanceElem.textContent.replace(/\,/g, '');
- const balanceVal = parseInt(balanceStr.substring(17, balanceStr.length - 3));
- const maxBankDiffVal = 2147483647 - balanceVal;
- const maxBankDiffStr = "Max Bank Goal: " + maxBankDiffVal.toLocaleString() + " NP";
- balanceElem.setAttribute('style', 'white-space: pre;');
- balanceElem.textContent += "\r\n" + maxBankDiffStr;
- })();
Advertisement
Add Comment
Please, Sign In to add comment