From 62ad39154d6338f594ee01c2cb125d735883217b Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Jan 13 2021 20:08:24 +0000 Subject: Merge branch 'master' into 'development' `Notification not defined` fix (should fix #192, may fix #224) See merge request fiat-tux/hat-softwares/lufi!78 --- diff --git a/themes/default/public/js/lufi-notifications.js b/themes/default/public/js/lufi-notifications.js index d198df6..d0cd504 100644 --- a/themes/default/public/js/lufi-notifications.js +++ b/themes/default/public/js/lufi-notifications.js @@ -1,5 +1,5 @@ function notify(title, body) { - if (!Notification) { + if (!'Notification' in window) { console.log("This browser does not support desktop notification, cannot send following message: "+title+" "+body); return; } @@ -16,7 +16,7 @@ function notify(title, body) { } document.addEventListener('DOMContentLoaded', function () { - if (!Notification) { + if (!'Notification' in window) { return; }