mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-21 08:06:27 -04:00
Merge branch 'ARI-5617' into qa
This commit is contained in:
commit
ca7af5a8a7
@ -28,9 +28,9 @@
|
||||
interval: 2500
|
||||
actions:
|
||||
- selector: div.see-more
|
||||
onceOnly: 1
|
||||
firstMatchOnly: 1
|
||||
- selector: li.next
|
||||
skipIDcheck: 1
|
||||
repeatSameElement: 1
|
||||
-
|
||||
url_regex: '^https?://(?:www\.)?marquette\.edu/.*$'
|
||||
behavior_js_template: marquette_edu.js
|
||||
|
@ -33,8 +33,8 @@ class UmbraBehavior {
|
||||
// should match older default and simpleclicks behavior, and more
|
||||
var k = this.index;
|
||||
var selector = this.actions[k].selector;
|
||||
var skipIDCheck = this.actions[k].skipIDcheck ? this.actions[k].skipIDcheck != false : false;
|
||||
var onceOnly = this.actions[k].onceOnly ? this.actions[k].onceOnly != false: false;
|
||||
var repeatSameElement = this.actions[k].repeatSameElement ? this.actions[k].repeatSameElement != false : false;
|
||||
var firstMatchOnly = this.actions[k].firstMatchOnly ? this.actions[k].firstMatchOnly != false: false;
|
||||
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;
|
||||
@ -58,7 +58,7 @@ class UmbraBehavior {
|
||||
doTarget(closeTargets[0], 'click');
|
||||
}
|
||||
}
|
||||
if (onceOnly) {
|
||||
if (firstMatchOnly) {
|
||||
var doTargets = [ documents[j].querySelector(selector) ];
|
||||
} else {
|
||||
var doTargets = documents[j].querySelectorAll(selector);
|
||||
@ -68,7 +68,7 @@ class UmbraBehavior {
|
||||
continue;
|
||||
}
|
||||
for ( var i = 0; i < doTargetsLength; i++) {
|
||||
if (!skipIDCheck && this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||
if (!repeatSameElement && this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||
continue;
|
||||
}
|
||||
if (!this.isVisible(doTargets[i])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user