mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-24 05:49:35 -04:00
minor edits
This commit is contained in:
parent
d0203ff9eb
commit
f78e1ff710
2 changed files with 11 additions and 5 deletions
|
@ -39,7 +39,7 @@
|
||||||
request_idle_timeout_sec: 10
|
request_idle_timeout_sec: 10
|
||||||
-
|
-
|
||||||
url_regex: '^https?://(?:www\.)?pm\.gc\.ca/.*$'
|
url_regex: '^https?://(?:www\.)?pm\.gc\.ca/.*$'
|
||||||
behavior_js_template: classUmbraBehavior.js.j2
|
behavior_js_template: umbraBehavior.js.j2
|
||||||
default_parameters:
|
default_parameters:
|
||||||
actions:
|
actions:
|
||||||
- selector: div.teaser, li.pager__item a
|
- selector: div.teaser, li.pager__item a
|
||||||
|
@ -64,6 +64,12 @@
|
||||||
click_css_selector: img.img-responsive
|
click_css_selector: img.img-responsive
|
||||||
click_until_hard_timeout: False
|
click_until_hard_timeout: False
|
||||||
request_idle_timeout_sec: 10
|
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
|
- # acalog https://webarchive.jira.com/browse/ARI-3775
|
||||||
url_regex: '^https?://.*[?&]catoid=[^?]*$'
|
url_regex: '^https?://.*[?&]catoid=[^?]*$'
|
||||||
behavior_js_template: simpleclicks.js.j2
|
behavior_js_template: simpleclicks.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
|
* Copyright (C) 2017 Internet Archive
|
||||||
*
|
*
|
||||||
|
@ -25,7 +25,7 @@ class UmbraBehavior {
|
||||||
this.alreadyDone = [];
|
this.alreadyDone = [];
|
||||||
this.idleSince = null;
|
this.idleSince = null;
|
||||||
this.intervalId = null;
|
this.intervalId = null;
|
||||||
this.intervalTimeMs = 250;
|
this.intervalTimeMs = 1000;
|
||||||
this.state = null; // currently unused
|
this.state = null; // currently unused
|
||||||
this.index = 0;
|
this.index = 0;
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,6 @@ class UmbraBehavior {
|
||||||
console.log("ready for next action");
|
console.log("ready for next action");
|
||||||
this.index += 1;
|
this.index += 1;
|
||||||
this.idleSince = null;
|
this.idleSince = null;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,7 +185,8 @@ class UmbraBehavior {
|
||||||
|
|
||||||
var umbraBehavior = new UmbraBehavior( {{actions|json}} );
|
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.
|
// Called from outside of this script.
|
||||||
var umbraBehaviorFinished = function() {
|
var umbraBehaviorFinished = function() {
|
Loading…
Add table
Add a link
Reference in a new issue