mirror of
https://github.com/RobinLinus/snapdrop.git
synced 2025-05-16 07:30:12 -07:00
Merge pull request #23 from remy/master
fix: don't display install banner when installed
This commit is contained in:
commit
aa9e9497d6
@ -14,6 +14,14 @@
|
|||||||
// app.baseUrl = '/polymer-starter-kit/';
|
// app.baseUrl = '/polymer-starter-kit/';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// don't display the install prompt if the user has *already* installed
|
||||||
|
window.addEventListener('beforeinstallprompt', function(event) {
|
||||||
|
if (window.matchMedia('(display-mode: standalone)').matches) {
|
||||||
|
return event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
app.displayInstalledToast = function() {
|
app.displayInstalledToast = function() {
|
||||||
// Check to make sure caching is actually enabled—it won't be in the dev environment.
|
// Check to make sure caching is actually enabled—it won't be in the dev environment.
|
||||||
if (!Polymer.dom(document).querySelector('platinum-sw-cache').disabled) {
|
if (!Polymer.dom(document).querySelector('platinum-sw-cache').disabled) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user