minor edits

This commit is contained in:
Barbara Miller 2017-11-20 17:17:44 -08:00
parent d0203ff9eb
commit f78e1ff710
2 changed files with 11 additions and 5 deletions

View File

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

View File

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