From 87e484291ccda8b74a1ecfb690f0fde72e2da110 Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Thu, 24 Jan 2019 17:43:20 +0500 Subject: [PATCH] add check if no mention sound is set in Firefox sound notification workaround --- js/interface_common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/interface_common.js b/js/interface_common.js index 9ffe2ba..1c33ec7 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -3083,7 +3083,8 @@ $(function () { // need to play something once in result of click on Firefox to be able to play sound notifications // FXIME it's just workaround of FF's bug, see https://bugzilla.mozilla.org/show_bug.cgi?id=1197631 $('body').on('click', function () { - playSound('player', $.Options.sndMention.val, 0.001); + if ($.Options.sndMention.val !== 'false') + playSound('player', $.Options.sndMention.val, 0.001); setTimeout(function () {$('body').off('click');}, 10000); // sound must be played before unbinding }); });