diff options
author | =Corey Hulen <corey@hulen.com> | 2015-12-14 15:21:22 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-12-14 15:21:22 -0800 |
commit | b94d025da44aeebd9651f46cfc4fe367cdd56a87 (patch) | |
tree | c1a140d81eca5d9514a047db540adda0a6b45b11 /web/templates/head.html | |
parent | f5ec973cba4c224de5ba75b56aad447f715b9d6b (diff) | |
download | chat-b94d025da44aeebd9651f46cfc4fe367cdd56a87.tar.gz chat-b94d025da44aeebd9651f46cfc4fe367cdd56a87.tar.bz2 chat-b94d025da44aeebd9651f46cfc4fe367cdd56a87.zip |
PLT-1404 signal login to other tags
Diffstat (limited to 'web/templates/head.html')
-rw-r--r-- | web/templates/head.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web/templates/head.html b/web/templates/head.html index be4ed2b25..b39bbc291 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -68,6 +68,16 @@ console.log('detected logout from a different tab'); window.location.href = '/' + window.mm_team.name; } + + if (e.originalEvent.key === '__login__' && e.originalEvent.storageArea === localStorage && e.originalEvent.newValue) { + // make sure it isn't this tab that is sending the logout signal (only necessary for IE11) + if (window.BrowserStore.isSignallingLogin(e.originalEvent.newValue)) { + return; + } + + console.log('detected login from a different tab'); + window.location.href = '/'; + } }); }); </script> |