mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-24 15:25:40 -04:00
add idCheck feature, default: true
This commit is contained in:
parent
8e273b2e6b
commit
c31f13e47f
2 changed files with 9 additions and 1 deletions
|
@ -21,6 +21,13 @@
|
||||||
url_regex: '^https?://(?:www\.)?facebook\.com/.*$'
|
url_regex: '^https?://(?:www\.)?facebook\.com/.*$'
|
||||||
behavior_js_template: facebook.js
|
behavior_js_template: facebook.js
|
||||||
request_idle_timeout_sec: 30
|
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/.*$'
|
url_regex: '^https?://(?:www\.)?marquette\.edu/.*$'
|
||||||
behavior_js_template: marquette_edu.js
|
behavior_js_template: marquette_edu.js
|
||||||
|
|
|
@ -33,6 +33,7 @@ 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 idCheck = this.actions[k].idcheck ? this.actions[k].idcheck : true;
|
||||||
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;
|
||||||
|
@ -62,7 +63,7 @@ class UmbraBehavior {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for ( var i = 0; i < doTargetsLength; i++) {
|
for ( var i = 0; i < doTargetsLength; i++) {
|
||||||
if (this.alreadyDone.indexOf(doTargets[i]) > -1) {
|
if idCheck and (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