diff --git a/brozzler/behaviors.yaml b/brozzler/behaviors.yaml index 9596dfc..43186e5 100644 --- a/brozzler/behaviors.yaml +++ b/brozzler/behaviors.yaml @@ -39,7 +39,7 @@ request_idle_timeout_sec: 10 - url_regex: '^https?://(?:www\.)?pm\.gc\.ca/.*$' - behavior_js_template: classUmbraBehavior.js.j2 + behavior_js_template: umbraBehavior.js.j2 default_parameters: actions: - selector: div.teaser, li.pager__item a @@ -64,6 +64,12 @@ click_css_selector: img.img-responsive click_until_hard_timeout: False request_idle_timeout_sec: 10 +- # acalog https://webarchive.jira.com/browse/ARI-5517 + url_regex: '^https?://(?:www\.)?thejewishnews.com/.*$' + behavior_js_template: umbraBehavior.js.j2 + default_parameters: + actions: + - selector: a#get_more - # acalog https://webarchive.jira.com/browse/ARI-3775 url_regex: '^https?://.*[?&]catoid=[^?]*$' behavior_js_template: simpleclicks.js.j2 diff --git a/brozzler/js-templates/umbraBehavior.js b/brozzler/js-templates/umbraBehavior.js.j2 similarity index 94% rename from brozzler/js-templates/umbraBehavior.js rename to brozzler/js-templates/umbraBehavior.js.j2 index 27ede05..0ebc5dc 100644 --- a/brozzler/js-templates/umbraBehavior.js +++ b/brozzler/js-templates/umbraBehavior.js.j2 @@ -1,5 +1,5 @@ /* - * brozzler/js-templates/classUmbrabehavior.js.j2 - an umbra/brozzler behavior class + * brozzler/js-templates/umbrabehavior.js.j2 - an umbra/brozzler behavior class * * Copyright (C) 2017 Internet Archive * @@ -25,7 +25,7 @@ class UmbraBehavior { this.alreadyDone = []; this.idleSince = null; this.intervalId = null; - this.intervalTimeMs = 250; + this.intervalTimeMs = 1000; this.state = null; // currently unused this.index = 0; } @@ -127,7 +127,6 @@ class UmbraBehavior { console.log("ready for next action"); this.index += 1; this.idleSince = null; - return; } } } @@ -186,7 +185,8 @@ class UmbraBehavior { var umbraBehavior = new UmbraBehavior( {{actions|json}} ); -// var umbraBehavior = new UmbraBehavior( [{'selector': 'div.teaser, li.pager__item a'}] ); +//var umbraBehavior = new UmbraBehavior( [{'selector': 'div.teaser, li.pager__item a'}] ); // pm.gc.ca/eng/news/statements +//var umbraBehavior = new UmbraBehavior( [{'selector': 'a#get_more'}] ); // www.thejewishnews.com/arts-life/ multi iframes, error! // Called from outside of this script. var umbraBehaviorFinished = function() {