Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Toggle Number Precision by MTP3!*/
- /*
- Usage:
- 1. Make a new bookmark
- 2. Paste this code into the URL field:
- javascript:$.getScript('https://pastebin.com/raw/BPFkA9n5');
- 3. Click, you should hear a success bling!
- 4. ???
- 5. Profit
- */
- var mlCode = ""; /* Stores all of Manyland's JS for future variable name extraction. */
- var numberShortener;
- var oldNumberShortener;
- var getMLcode = function () { /* Get Manyland's code! */
- return new Promise((res, rej) => {
- a = $.get("manyland.js?v=" + v), a.always(function() { /* JQuery that code! */
- mlCode = a.responseText; /* Store it too! */
- res(); /* Resolve. */
- });
- });
- };
- var findFind = (begin, end) => { /* Find the text between 2 literal strings */
- var pos1 = mlCode.indexOf(begin) + begin.length;
- var pos2 = mlCode.indexOf(end, pos1);
- return mlCode.substring(pos1, pos2);
- };
- (async () => {
- await getMLcode(); /* Wait until we've dumped the code. */
- /* Find an obfuscated variable name that we're required to use. */
- numberShortener = findFind(
- '&&(this.arrows.left="<",this.arrows.right=">")},',
- ":function(a){var b=a;if(1E3<=a){for("
- );
- /* Helpfully tell you what it currently is! */
- consoleref.log("ig.game.strings[numberShortener] = ig.game.strings." + numberShortener);
- if (!oldNumberShortener) {
- oldNumberShortener = ig.game.strings[numberShortener]; /* Old number shortener. */
- ig.game.strings[numberShortener] = (a) => { /* New number shortener, which spoiler alert, just returns what's input. */
- if (!a) {
- return "";
- } else {
- return a.toString();
- };
- };
- } else {
- /* Perform a swap if both functions exist! */
- var a = oldNumberShortener;
- oldNumberShortener = ig.game.strings[numberShortener];
- ig.game.strings[numberShortener] = a;
- };
- ig.game.sounds.success.play();
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement