/*
	Ajouter fonctions du service worker

self.addEventListener('push', function(event) {
  var notificationOptions = {
    body: "Hello World",
  //  icon: icon ? icon : 'public/icons/icon-default.png',
    data:{
      url : 'http://example.com/updates'
    }
  };
  title = "Ceci est une notification !";
  return self.registration.showNotification(title, notificationOptions);
});

self.addEventListener('notificationclick', function(event) {  
  var messageId = event.notification.data;

  event.notification.close();

  if (event.action === 'like') {  
    silentlyLikeItem();  
  }  
  else if (event.action === 'reply') {  
    clients.openWindow("/messages?reply=" + messageId);  
  }  
  else {  
    clients.openWindow("/messages?reply=" + messageId);  
  }  
}, false);
*/