Merge pull request #14 from eldondev/master

Check to see if the object has a click method before calling it
This commit is contained in:
vonrosen 2014-03-10 12:01:20 -07:00
commit b3bd959ab2

View file

@ -35,7 +35,9 @@ var intervalFunc = function() {
// var pos = target.getBoundingClientRect().top;
// window.scrollTo(0, target.getBoundingClientRect().top - 100);
console.log("clicking at " + target.getBoundingClientRect().top + " on " + target.outerHTML);
target.click();
if(target.click != undefined) {
target.click();
}
target.style.border = '1px solid #0a0';
alreadyClicked[target] = true;
clickedSomething = true;