Open file import
Summary: This change only adds the PWA as capable of handling files with the ".flipper" extension. Reviewed By: aigoncharov Differential Revision: D48353437 fbshipit-source-id: fd78942ac4dffb7d26d5ca5be826290018465b93
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9728155cbf
commit
ce13ee426f
@@ -138,25 +138,6 @@
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker
|
||||
.register('/service-worker.js')
|
||||
.then(() => {
|
||||
console.log('Flipper Service Worker has been registered');
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error('Flipper failed to register Service Worker', e);
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('beforeinstallprompt', (e) => {
|
||||
console.log('Flipper PWA before install prompt with event', e);
|
||||
// Prevent Chrome 67 and earlier from automatically showing the prompt.
|
||||
e.preventDefault();
|
||||
// Stash the event so it can be triggered later.
|
||||
global.PWAppInstallationEvent = e;
|
||||
});
|
||||
|
||||
init();
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user