-
-
Save coma/4dd4006ceb5c62b03f37 to your computer and use it in GitHub Desktop.
This file contains 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
(function () { | |
var box = document.getElementById('box'); | |
var color = function (node) { | |
return node.style.backgroundColor; | |
}; | |
var last, i = 0; | |
var hack = function () { | |
box.childNodes[i++].click(); | |
last = setTimeout(hack, 1); | |
}; | |
var observer = new MutationObserver(function () { | |
clearTimeout(last); | |
i = 0; | |
hack(); | |
}); | |
observer.observe(box, { | |
attributes: false, | |
childList: true, | |
characterData: false | |
}); | |
hack(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment