diff --git a/brozzler/behaviors.yaml b/brozzler/behaviors.yaml index 5bcd945..d3a97fc 100644 --- a/brozzler/behaviors.yaml +++ b/brozzler/behaviors.yaml @@ -39,11 +39,11 @@ request_idle_timeout_sec: 10 - url_regex: '^https?://catalogue\.noguchi\.org/index.php/LoginReg/form$' - behavior_js_template: noguchi.js.template + behavior_js_template: noguchi.js.j2 request_idle_timeout_sec: 10 - url_regex: '^https?://catalogue\.noguchi\.org/index.php/Search/Index/search/.*/target/ca_.*$' - behavior_js_template: noguchi.js.template + behavior_js_template: noguchi.js.j2 request_idle_timeout_sec: 10 - url_regex: '^https?://(?:www\.)?huffingtonpost\.com/.*$' diff --git a/brozzler/js-templates/clickGetPDFs.js.template b/brozzler/js-templates/clickGetPDFs.js.j2 similarity index 98% rename from brozzler/js-templates/clickGetPDFs.js.template rename to brozzler/js-templates/clickGetPDFs.js.j2 index 4349835..d18e32a 100644 --- a/brozzler/js-templates/clickGetPDFs.js.template +++ b/brozzler/js-templates/clickGetPDFs.js.j2 @@ -37,7 +37,7 @@ var umbraAboveBelowOrOnScreen = function(e) { var umbraState = {'idleSince':null}; var umbraAlreadyClicked = {'2016':true}; -var clickTargets = document.querySelectorAll("${css_selector}"); +var clickTargets = document.querySelectorAll({{css_selector|json}}); var pdfSelector = "a"; diff --git a/brozzler/js-templates/noguchi.js.template b/brozzler/js-templates/noguchi.js.j2 similarity index 96% rename from brozzler/js-templates/noguchi.js.template rename to brozzler/js-templates/noguchi.js.j2 index 5d58122..1436410 100644 --- a/brozzler/js-templates/noguchi.js.template +++ b/brozzler/js-templates/noguchi.js.j2 @@ -17,8 +17,8 @@ * limitations under the License. */ -var UMBRA_N_USER_NAME = "${parameter_username}"; -var UMBRA_N_PASSWORD = "${parameter_password}"; +var UMBRA_N_USER_NAME = {{parameter_username|json}}; +var UMBRA_N_PASSWORD = {{parameter_password|json}}; var umbraState = {'idleSince': null}; var re = /(?:Previous){0,1}\s+(page\s(\d+)\/\d+)\s+(?:Next){0,1}/;