mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
add idCheck feature, default: true
This commit is contained in:
parent
8e273b2e6b
commit
c31f13e47f
@ -21,6 +21,13 @@
|
||||
url_regex: '^https?://(?:www\.)?facebook\.com/.*$'
|
||||
behavior_js_template: facebook.js
|
||||
request_idle_timeout_sec: 30
|
||||
-
|
||||
url_regex: '^https?://americaspresidents\.si\.edu/gallery.*$'
|
||||
behavior_js_template: umbraBehavior.js.j2
|
||||
default_parameters:
|
||||
actions:
|
||||
- selector: div.see-more, li.next
|
||||
idcheck: false
|
||||
-
|
||||
url_regex: '^https?://(?:www\.)?marquette\.edu/.*$'
|
||||
behavior_js_template: marquette_edu.js
|
||||
|
@ -33,6 +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 action = this.actions[k].do ? this.actions[k].do : 'click';
|
||||
var closeSelector = this.actions[k].closeSelector ? this.actions[k].closeSelector : null;
|
||||
var didSomething = false;
|
||||
@ -62,7 +63,7 @@ class UmbraBehavior {
|
||||
continue;
|
||||
}
|
||||
for ( var i = 0; i < doTargetsLength; i++) {
|
||||
if (this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||
if idCheck and (this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
||||
continue;
|
||||
}
|
||||
if (!this.isVisible(doTargets[i])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user