diff --git a/brozzler/behaviors.yaml b/brozzler/behaviors.yaml index 2b26d03..69f2c5f 100644 --- a/brozzler/behaviors.yaml +++ b/brozzler/behaviors.yaml @@ -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 diff --git a/brozzler/js-templates/umbraBehavior.js.j2 b/brozzler/js-templates/umbraBehavior.js.j2 index fb6b93d..5584e07 100644 --- a/brozzler/js-templates/umbraBehavior.js.j2 +++ b/brozzler/js-templates/umbraBehavior.js.j2 @@ -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])) {