mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-09 06:52:46 -04:00
better idCheck and configurable interval timing
This commit is contained in:
parent
037e4193ab
commit
cd3fa154d9
1 changed files with 3 additions and 3 deletions
|
@ -25,7 +25,7 @@ class UmbraBehavior {
|
|||
this.alreadyDone = [];
|
||||
this.idleSince = null;
|
||||
this.intervalId = null;
|
||||
this.intervalTimeMs = 300;
|
||||
this.intervalTimeMs = {{interval or '300'}};
|
||||
this.index = 0;
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ class UmbraBehavior {
|
|||
// should match older default and simpleclicks behavior, and more
|
||||
var k = this.index;
|
||||
var selector = this.actions[k].selector;
|
||||
var idCheck = this.actions[k].idcheck ? this.actions[k].idcheck : true;
|
||||
var idCheck = this.actions[k].idcheck === false ? this.actions[k].idcheck : true;
|
||||
var action = this.actions[k].do ? this.actions[k].do : 'click';
|
||||
var closeSelector = this.actions[k].closeSelector ? this.actions[k].closeSelector : null;
|
||||
var didSomething = false;
|
||||
|
@ -63,7 +63,7 @@ class UmbraBehavior {
|
|||
continue;
|
||||
}
|
||||
for ( var i = 0; i < doTargetsLength; i++) {
|
||||
if idCheck and (this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||
if (idCheck && this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||
continue;
|
||||
}
|
||||
if (!this.isVisible(doTargets[i])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue