From f491515904c344f6923aa6c86f295c47e6d5712f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 25 Oct 2017 23:22:17 -0400 Subject: [PATCH] timeout on first collectIfNeeded --- src/content/notificationBar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/content/notificationBar.js b/src/content/notificationBar.js index d07b286bd37..30704beb0a9 100644 --- a/src/content/notificationBar.js +++ b/src/content/notificationBar.js @@ -19,7 +19,10 @@ chrome.storage.local.get('disableAddLoginNotification', function (obj) { if (!obj || !obj.disableAddLoginNotification) { - collectIfNeeded(); + if (collectIfNeededTimeout) { + clearTimeout(collectIfNeededTimeout); + } + collectIfNeededTimeout = setTimeout(collectIfNeeded, 1000); } }); });