mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-30 18:18:44 -04:00
better config names
This commit is contained in:
parent
74fc7cd102
commit
ae6f72769a
2 changed files with 6 additions and 6 deletions
|
@ -28,9 +28,9 @@
|
||||||
interval: 2500
|
interval: 2500
|
||||||
actions:
|
actions:
|
||||||
- selector: div.see-more
|
- selector: div.see-more
|
||||||
onceOnly: 1
|
firstMatchOnly: 1
|
||||||
- selector: li.next
|
- selector: li.next
|
||||||
skipIDcheck: 1
|
repeatSameElement: 1
|
||||||
-
|
-
|
||||||
url_regex: '^https?://(?:www\.)?marquette\.edu/.*$'
|
url_regex: '^https?://(?:www\.)?marquette\.edu/.*$'
|
||||||
behavior_js_template: marquette_edu.js
|
behavior_js_template: marquette_edu.js
|
||||||
|
|
|
@ -33,8 +33,8 @@ class UmbraBehavior {
|
||||||
// should match older default and simpleclicks behavior, and more
|
// should match older default and simpleclicks behavior, and more
|
||||||
var k = this.index;
|
var k = this.index;
|
||||||
var selector = this.actions[k].selector;
|
var selector = this.actions[k].selector;
|
||||||
var skipIDCheck = this.actions[k].skipIDcheck ? this.actions[k].skipIDcheck != false : false;
|
var repeatSameElement = this.actions[k].repeatSameElement ? this.actions[k].repeatSameElement != false : false;
|
||||||
var onceOnly = this.actions[k].onceOnly ? this.actions[k].onceOnly != 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 action = this.actions[k].do ? this.actions[k].do : 'click';
|
||||||
var closeSelector = this.actions[k].closeSelector ? this.actions[k].closeSelector : null;
|
var closeSelector = this.actions[k].closeSelector ? this.actions[k].closeSelector : null;
|
||||||
var didSomething = false;
|
var didSomething = false;
|
||||||
|
@ -58,7 +58,7 @@ class UmbraBehavior {
|
||||||
doTarget(closeTargets[0], 'click');
|
doTarget(closeTargets[0], 'click');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (onceOnly) {
|
if (firstMatchOnly) {
|
||||||
var doTargets = [ documents[j].querySelector(selector) ];
|
var doTargets = [ documents[j].querySelector(selector) ];
|
||||||
} else {
|
} else {
|
||||||
var doTargets = documents[j].querySelectorAll(selector);
|
var doTargets = documents[j].querySelectorAll(selector);
|
||||||
|
@ -68,7 +68,7 @@ class UmbraBehavior {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for ( var i = 0; i < doTargetsLength; i++) {
|
for ( var i = 0; i < doTargetsLength; i++) {
|
||||||
if (!skipIDCheck && this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
if (!repeatSameElement && this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!this.isVisible(doTargets[i])) {
|
if (!this.isVisible(doTargets[i])) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue