From 3d487e504ca0b71ed9f4a46c36f2fe99888c2f52 Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Fri, 19 Apr 2019 00:36:55 +0200 Subject: [PATCH] Prevent duplicate install notifications (#125) --- src/background.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/background.js b/src/background.js index eee6dde..0f642e8 100644 --- a/src/background.js +++ b/src/background.js @@ -1014,12 +1014,15 @@ function onExtensionInstalled(details) { }; if (details.reason === "install") { - show( - "installed", - "browserpass: Install native host app", - "Remember to install the complementary native host app to use this extension.\n" + - "Instructions here: https://github.com/browserpass/browserpass-native" - ); + if (localStorage.getItem("installed") === null) { + localStorage.setItem("installed", Date.now()); + show( + "installed", + "browserpass: Install native host app", + "Remember to install the complementary native host app to use this extension.\n" + + "Instructions here: https://github.com/browserpass/browserpass-native" + ); + } } else if (details.reason === "update") { var changelog = { 3000000: