diff --git a/file/js/be.bastelstu.Chat.litcoffee b/file/js/be.bastelstu.Chat.litcoffee index aaf448b..4fa3a6e 100644 --- a/file/js/be.bastelstu.Chat.litcoffee +++ b/file/js/be.bastelstu.Chat.litcoffee @@ -315,11 +315,11 @@ Scroll down when autoscroll is being activated. Enable duplicate tab detection. - window.localStorage.setItem 'be.bastelstu.chat.session', chatSession - $(window).on 'storage', (event) -> - if event.originalEvent.key is 'be.bastelstu.chat.session' - if parseInt(event.originalEvent.newValue) isnt chatSession - showError WCF.Language.get 'chat.error.duplicateTab' + try + window.localStorage.setItem 'be.bastelstu.chat.session', chatSession + $(window).on 'storage', (event) -> + if event.originalEvent.key is 'be.bastelstu.chat.session' + showError WCF.Language.get 'chat.error.duplicateTab' if parseInt(event.originalEvent.newValue) isnt chatSession Ask for permissions to use Desktop notifications when notifications are activated.