1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Ignore errors when setting local storage for duplicate tab protection

This commit is contained in:
Tim Düsterhus 2013-09-15 22:44:50 +02:00
parent a82d6bd6b5
commit e1dc33511b

View File

@ -315,11 +315,11 @@ Scroll down when autoscroll is being activated.
Enable duplicate tab detection. Enable duplicate tab detection.
try
window.localStorage.setItem 'be.bastelstu.chat.session', chatSession window.localStorage.setItem 'be.bastelstu.chat.session', chatSession
$(window).on 'storage', (event) -> $(window).on 'storage', (event) ->
if event.originalEvent.key is 'be.bastelstu.chat.session' if event.originalEvent.key is 'be.bastelstu.chat.session'
if parseInt(event.originalEvent.newValue) isnt chatSession showError WCF.Language.get 'chat.error.duplicateTab' if parseInt(event.originalEvent.newValue) isnt chatSession
showError WCF.Language.get 'chat.error.duplicateTab'
Ask for permissions to use Desktop notifications when notifications are activated. Ask for permissions to use Desktop notifications when notifications are activated.