Created
July 23, 2011 15:19
-
-
Save suvene/1101541 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
javascript: (function() { | |
var es = document.getElementsByTagName('div'); | |
function invokeMouseEvent(elem, evname) { | |
var e = document.createEvent('MouseEvents'); | |
e.initMouseEvent(evname, true, true, e.view||window, 0, 0, 0, 0, 0, | |
false, false, false, false, 0, null); | |
elem.dispatchEvent(e); | |
} | |
for (var i = 0, len = es.length; i < len; i++) { | |
var e = es[i]; | |
if (e.className == 'a-j-Db-Dq') { | |
invokeMouseEvent('click', e.parentNode); | |
} | |
} | |
})() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment