diff --git a/client/index.html b/client/index.html index cbb823ce..b2ade954 100644 --- a/client/index.html +++ b/client/index.html @@ -243,8 +243,14 @@

Notifications

+
+
+
diff --git a/client/js/shout.js b/client/js/shout.js index 99a89314..bc76ef2b 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -407,6 +407,7 @@ $(function() { var settings = $("#settings"); var options = $.extend({ badge: false, + desktopNotifications: false, colors: false, join: true, links: true, @@ -453,7 +454,7 @@ $(function() { }).find("input") .trigger("change"); - $("#badge").on("change", function() { + $("#desktopNotifications").on("change", function() { var self = $(this); if (self.prop("checked")) { if (Notification.permission !== "granted") { @@ -652,8 +653,10 @@ $(function() { if (settings.notification) { pop.play(); } - favico.badge("!"); - if (settings.badge && Notification.permission === "granted") { + if (settings.badge) { + favico.badge("!"); + } + if (settings.desktopNotifications && Notification.permission === "granted") { var notify = new Notification(msg.from + " says:", { body: msg.text.trim(), icon: "/img/logo-64.png",