Skip to content

Commit de47a1c

Browse files
authored
Update homepage.js
1 parent 50b73d1 commit de47a1c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

homepage/homepage.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,19 @@ function installPWA(evt) {
8282
} else { // open in the browser
8383

8484
window.location.replace(window.location.origin + '/full');
85+
86+
// save installation in local storage
87+
localStorage.setItem('installed', 'true');
8588

8689
}
8790

8891
} else { // open in the browser
8992

9093
window.location.replace(window.location.origin + '/full');
9194

95+
// save installation in local storage
96+
localStorage.setItem('installed', 'true');
97+
9298
}
9399

94100
}
@@ -110,10 +116,13 @@ document.querySelectorAll('.btn.install').forEach(button => {
110116

111117
button.addEventListener('click', installPWA);
112118

113-
if (isSafari) {
119+
if (isSafari || !isMobile) {
114120

115121
button.classList.remove('loading');
116122

123+
// save installation in local storage
124+
localStorage.setItem('installed', 'true');
125+
117126
}
118127

119128
if (!checkLocalStorage()) {

0 commit comments

Comments
 (0)