Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Disable Focus Reload by MTP3!*/
- /*
- Usage:
- 1. Make a new bookmark
- 2. Paste this code into the URL field:
- javascript:$.getScript('https://pastebin.com/raw/zdeKe6dV');
- 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 focusReload;
- 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. */
- focusReload = findFind(
- "&&ig.game.writableDialog.close()}catch(a){}},",
- ":function(){if(!ig.game."
- );
- /* Helpfully tell you what it currently is! */
- consoleref.log("ig.game.errorManager[focusReload] = ig.game.errorManager." + focusReload);
- /* Destroy the code! Makes you not reload upon Alt+Tabbing in the air. */
- ig.game.errorManager[focusReload] = () => {};
- ig.game.sounds.success.play();
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement