From 425d44bf4ac8eec097a0ce490e63dea94971d7de Mon Sep 17 00:00:00 2001 From: Barbara Miller Date: Thu, 13 Dec 2018 15:13:03 -0800 Subject: [PATCH] updates for jina2 --- brozzler/behaviors.yaml | 2 +- brozzler/js-templates/umbraBehavior18q4.js.j2 | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/brozzler/behaviors.yaml b/brozzler/behaviors.yaml index 6c46c7a..e29fab6 100644 --- a/brozzler/behaviors.yaml +++ b/brozzler/behaviors.yaml @@ -26,7 +26,7 @@ behavior_js_template: umbraBehavior18q4.js.j2 default_parameters: interval: 500 - iframes: false + skip_iframes: true actions: - selector: button.coreSpriteDismissLarge - selector: 'a>.eLAPa>.KL4Bh' diff --git a/brozzler/js-templates/umbraBehavior18q4.js.j2 b/brozzler/js-templates/umbraBehavior18q4.js.j2 index 100b5b7..7c24a13 100644 --- a/brozzler/js-templates/umbraBehavior18q4.js.j2 +++ b/brozzler/js-templates/umbraBehavior18q4.js.j2 @@ -26,7 +26,11 @@ class UmbraBehavior { this.idleSince = null; this.intervalId = null; this.intervalTimeMs = {{interval or 300}}; - this.doIframes = {{iframes or true}}; + {% if skip_iframes %} + this.skipIframes = true; + {% else %} + this.skipIframes = false; + {% endif %} this.index = 0; } @@ -44,7 +48,7 @@ class UmbraBehavior { var documents = []; documents[0] = document; - if (this.doIframes) { + if (!(this.skipIframes)) { var iframes = document.querySelectorAll("iframe"); var iframesLength = iframes.length; for (var i = 0; i < iframesLength; i++) {