Created
December 12, 2015 17:21
-
-
Save erayarslan/c59c1515297eb3b2999d to your computer and use it in GitHub Desktop.
lel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // localStorage.level = 1000; if u want : ) | |
| var click = function () { | |
| document.body.dispatchEvent(new Event('mousedown')); | |
| }; | |
| var getElementRotate = function (id) { | |
| try { | |
| var values = window | |
| .getComputedStyle(document.getElementById(id), null) | |
| .getPropertyValue("transform") | |
| .split('(')[1].split(')')[0] | |
| .split(','); | |
| return Math.round(Math.atan2(values[1], values[0]) * (180/Math.PI)); | |
| } catch (e) { | |
| // | |
| } | |
| }; | |
| var l = getElementRotate("locker"); | |
| document.body.addEventListener("DOMSubtreeModified", function(e) { | |
| l = getElementRotate("locker"); | |
| run(); | |
| }, false); | |
| click(); | |
| var run = function () { | |
| setTimeout(function () { | |
| var k = getElementRotate("key"); | |
| if (l == k || l + 1 == k) { | |
| click(); | |
| } else { | |
| run(); | |
| } | |
| }, 0); | |
| }; | |
| run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment