mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-19 23:35:54 -04:00
Check to see if the object has a click method before calling it
This commit is contained in:
parent
a16ce4abeb
commit
427b74ebfc
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user