mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-24 22:09:35 -04:00
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:
commit
b3bd959ab2
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ var intervalFunc = function() {
|
||||||
// var pos = target.getBoundingClientRect().top;
|
// var pos = target.getBoundingClientRect().top;
|
||||||
// window.scrollTo(0, target.getBoundingClientRect().top - 100);
|
// window.scrollTo(0, target.getBoundingClientRect().top - 100);
|
||||||
console.log("clicking at " + target.getBoundingClientRect().top + " on " + target.outerHTML);
|
console.log("clicking at " + target.getBoundingClientRect().top + " on " + target.outerHTML);
|
||||||
target.click();
|
if(target.click != undefined) {
|
||||||
|
target.click();
|
||||||
|
}
|
||||||
target.style.border = '1px solid #0a0';
|
target.style.border = '1px solid #0a0';
|
||||||
alreadyClicked[target] = true;
|
alreadyClicked[target] = true;
|
||||||
clickedSomething = true;
|
clickedSomething = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue