From 3fe78e8972d8cee71eef5f1cbbdf3c73382ecd3c Mon Sep 17 00:00:00 2001 From: Nicolas Hohm Date: Sat, 14 Nov 2015 17:57:19 +0100 Subject: [PATCH] Implement notifications for all messages Implement option to get notifications also for message not just for mentions Resolves: #446 --- client/index.html | 7 +++++++ client/js/shout.js | 7 +++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/index.html b/client/index.html index b774a2a3..cbb823ce 100644 --- a/client/index.html +++ b/client/index.html @@ -258,6 +258,13 @@ + +
+ +

About Shout

diff --git a/client/js/shout.js b/client/js/shout.js index c3560284..a24677b5 100644 --- a/client/js/shout.js +++ b/client/js/shout.js @@ -347,6 +347,7 @@ $(function() { part: true, thumbnails: true, quit: true, + notifyAllMessages: false, }, $.cookie("settings")); for (var i in options) { @@ -372,6 +373,7 @@ $(function() { "nick", "part", "quit", + "notifyAllMessages", ].indexOf(name) !== -1) { chat.toggleClass("hide-" + name, !self.prop("checked")); } @@ -573,9 +575,10 @@ $(function() { var isQuery = button.hasClass("query"); var type = msg.type; var highlight = type.contains("highlight"); - if (highlight || isQuery) { + var message = type.contains("message"); + var settings = $.cookie("settings") || {}; + if (highlight || isQuery || (settings.notifyAllMessages && message)) { if (!document.hasFocus() || !$(target).hasClass("active")) { - var settings = $.cookie("settings") || {}; if (settings.notification) { pop.play(); }