Looking for a Javascript that do a left-mouse click on a image/button identified by ID or CLASS name, wait x seconds and repeat. And able to run in developer tools Console tap, in chrome and firefox.
Tried to write it myself, cause i figured it would be a simple code, but after 2 hours of trial and error with no luck, i am starting to run out of options.
Hopefully a Javascript pro out there got time to help out a very novice user ;)
You can use it like this:
simulate(document.getElementById("btn"), "click");
Note that as a third parameter you can pass in 'options'. The options you don't specify are taken from the defaultOptions (see bottom of the script). So if you for example want to specify mouse coordinates you can do something like:
simulate(document.getElementById("btn"), "click", { pointerX: 123, pointerY: 321 })
You can use a similar approach to override other default options.
Credits should go to kangax. Here's the original source (prototype.js specific).