mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-11 07:50:24 -04:00
tweaks post-troubleshooting ARI-5241
This commit is contained in:
parent
abc39c0ef2
commit
692707a9e0
1 changed files with 8 additions and 6 deletions
|
@ -61,17 +61,19 @@ class UmbraBehavior {
|
|||
for (var j = 0; j < documentsLength; j++) {
|
||||
if (closeSelector) {
|
||||
var closeTargets = documents[j].querySelectorAll(closeSelector);
|
||||
if (closeTargets != []) {
|
||||
this.doTarget(closeTargets[0], 'click');
|
||||
didSomething = true;
|
||||
if ((closeTargets.length > 0) &&
|
||||
(this.alreadyDone.indexOf(closeTargets[0]) === -1) &&
|
||||
(this.isVisible(closeTargets[0]))) {
|
||||
console.log('closing');
|
||||
doTarget(closeTargets[0], 'click');
|
||||
}
|
||||
}
|
||||
|
||||
var doTargets = documents[j].querySelectorAll(selector);
|
||||
if (doTargets == []) {
|
||||
var doTargetsLength = doTargets.length;
|
||||
if (!(doTargetsLength > 0)) {
|
||||
continue;
|
||||
}
|
||||
var doTargetsLength = doTargets.length;
|
||||
for ( var i = 0; i < doTargetsLength; i++) {
|
||||
if (this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||
continue;
|
||||
|
@ -121,7 +123,7 @@ class UmbraBehavior {
|
|||
this.idleSince = Date.now();
|
||||
} else {
|
||||
var idleTimeMs = Date.now() - this.idleSince;
|
||||
if ((idleTimeMs / 1000) > (this.IDLE_TIMEOUT_SEC - 1) && this.index < (this.actions.length - 1)) {
|
||||
if ((idleTimeMs / 1000) > (this.IDLE_TIMEOUT_SEC - 1) && (this.index < (this.actions.length - 1))) {
|
||||
console.log("ready for next action");
|
||||
this.index += 1;
|
||||
this.idleSince = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue