Skip to content

Commit 07921c7

Browse files
authored
Restore homepage.js
1 parent 8204bd3 commit 07921c7

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed

homepage/homepage.js

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,7 @@
22
const isMobile = navigator.userAgent.match('Mobile') || false;
33
const isMac = navigator.platform.indexOf('Mac') > -1;
44
const isSafari = navigator.userAgent.toLowerCase().indexOf('safari') != -1;
5-
6-
7-
const fileTypes = {
8-
'image': ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'ico', 'tif', 'tiff', 'webp'],
9-
'video': ['mp4', 'mpeg', 'ogv', 'webm'],
10-
'audio': ['avi', 'mp3', 'oga', 'ogg', 'opus', 'wav', 'weba'],
11-
'font': ['woff', 'woff2', 'ttf', 'otf'],
12-
'html': ['html', 'svg', 'htm'],
13-
'css': ['css', 'scss'],
14-
'javascript': ['js', 'ts', 'mjs', 'jsx'],
15-
'json': ['json'],
16-
'python': ['py', 'python'],
17-
'markdown': ['md'],
18-
'midi': ['midi'],
19-
'pdf': ['pdf']
20-
};
21-
22-
23-
5+
/*
246
window.addEventListener('appinstalled', logAppInstalled);
257
268
// Log the installation
@@ -42,8 +24,8 @@ function logAppInstalled(evt) {
4224
4325
});
4426
45-
}
46-
27+
}*/
28+
/*
4729
let deferredInstallPrompt = null;
4830
4931
window.addEventListener('beforeinstallprompt', saveBeforeInstallPromptEvent);
@@ -61,11 +43,12 @@ function saveBeforeInstallPromptEvent(evt) {
6143
6244
deferredInstallPrompt = evt;
6345
64-
}
46+
}*/
6547

6648
// Event handler for butInstall - Does the PWA installation.
6749
function installPWA(evt) {
6850

51+
/*
6952
// if codeit isn't already installed
7053
if (!localStorage.getItem('installed')) {
7154
@@ -107,13 +90,13 @@ function installPWA(evt) {
10790
}
10891
10992
} else { // open in the browser
110-
93+
*/
11194
window.location.href = (window.location.origin + '/full');
11295

11396
// save installation in local storage
11497
localStorage.setItem('installed', 'true');
11598

116-
}
99+
/*}*/
117100

118101
}
119102

@@ -179,7 +162,7 @@ function checkPWA() {
179162

180163
if (displayMode != 'browser tab') {
181164

182-
window.location.replace(window.location.origin + '/full');
165+
//window.location.replace(window.location.origin + '/full');
183166

184167
}
185168

0 commit comments

Comments
 (0)