add idCheck feature, default: true

This commit is contained in:
Barbara Miller 2018-03-13 16:29:42 -07:00
parent 8e273b2e6b
commit c31f13e47f
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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])) {