From 1ef528eea72961759a69f1a17a7f4482240c2884 Mon Sep 17 00:00:00 2001 From: Noah Levitt Date: Thu, 5 May 2016 10:35:06 -0700 Subject: [PATCH] do the clearInterval thing when umbraBehaviorFinished is about to return true on all the behaviors (that have that function)... for the record the impetus for this is to stop scrolling so we can take the screenshot --- brozzler/behaviors.d/facebook.js.template | 1 + brozzler/behaviors.d/instagram.js | 1 + brozzler/behaviors.d/marquette_edu.js | 1 + brozzler/behaviors.d/psu24.js | 1 + brozzler/behaviors.d/simpleclicks.js.template | 1 + 5 files changed, 5 insertions(+) diff --git a/brozzler/behaviors.d/facebook.js.template b/brozzler/behaviors.d/facebook.js.template index fc29e66..543bad7 100644 --- a/brozzler/behaviors.d/facebook.js.template +++ b/brozzler/behaviors.d/facebook.js.template @@ -191,6 +191,7 @@ var umbraBehaviorFinished = function() { if (umbraState.idleSince != null) { var idleTimeMs = Date.now() - umbraState.idleSince; if (idleTimeMs / 1000 > UMBRA_USER_ACTION_IDLE_TIMEOUT_SEC) { + clearInterval(umbraIntervalId); return true; } } diff --git a/brozzler/behaviors.d/instagram.js b/brozzler/behaviors.d/instagram.js index 9bc0842..ef4759d 100644 --- a/brozzler/behaviors.d/instagram.js +++ b/brozzler/behaviors.d/instagram.js @@ -137,6 +137,7 @@ var umbraInstagramBehavior = { if (this.idleSince != null) { var idleTimeMs = Date.now() - this.idleSince; if (idleTimeMs / 1000 > this.IDLE_TIMEOUT_SEC) { + clearInterval(this.intervalId); return true; } } diff --git a/brozzler/behaviors.d/marquette_edu.js b/brozzler/behaviors.d/marquette_edu.js index b3a70f1..9876a35 100644 --- a/brozzler/behaviors.d/marquette_edu.js +++ b/brozzler/behaviors.d/marquette_edu.js @@ -62,6 +62,7 @@ var umbraBehaviorFinished = function() { if (umbraState.idleSince != null) { var idleTimeMs = Date.now() - umbraState.idleSince; if (idleTimeMs / 1000 > UMBRA_USER_ACTION_IDLE_TIMEOUT_SEC) { + clearInterval(umbraIntervalID); return true; } } diff --git a/brozzler/behaviors.d/psu24.js b/brozzler/behaviors.d/psu24.js index a551961..15388fc 100644 --- a/brozzler/behaviors.d/psu24.js +++ b/brozzler/behaviors.d/psu24.js @@ -112,6 +112,7 @@ var umbraBehavior = { if (this.idleSince != null) { var idleTimeMs = Date.now() - this.idleSince; if (idleTimeMs / 1000 > this.IDLE_TIMEOUT_SEC) { + clearInterval(this.intervalId); return true; } } diff --git a/brozzler/behaviors.d/simpleclicks.js.template b/brozzler/behaviors.d/simpleclicks.js.template index 425cecf..282c096 100644 --- a/brozzler/behaviors.d/simpleclicks.js.template +++ b/brozzler/behaviors.d/simpleclicks.js.template @@ -110,6 +110,7 @@ var umbraBehavior = { if (this.idleSince != null) { var idleTimeMs = Date.now() - this.idleSince; if (idleTimeMs / 1000 > this.IDLE_TIMEOUT_SEC) { + clearInterval(this.intervalId); return true; } }