Skip to content

Commit 3d487e5

Browse files
authored
Prevent duplicate install notifications (#125)
1 parent 453aff6 commit 3d487e5

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/background.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,12 +1014,15 @@ function onExtensionInstalled(details) {
10141014
};
10151015

10161016
if (details.reason === "install") {
1017-
show(
1018-
"installed",
1019-
"browserpass: Install native host app",
1020-
"Remember to install the complementary native host app to use this extension.\n" +
1021-
"Instructions here: https://github.com/browserpass/browserpass-native"
1022-
);
1017+
if (localStorage.getItem("installed") === null) {
1018+
localStorage.setItem("installed", Date.now());
1019+
show(
1020+
"installed",
1021+
"browserpass: Install native host app",
1022+
"Remember to install the complementary native host app to use this extension.\n" +
1023+
"Instructions here: https://github.com/browserpass/browserpass-native"
1024+
);
1025+
}
10231026
} else if (details.reason === "update") {
10241027
var changelog = {
10251028
3000000:

0 commit comments

Comments
 (0)