diff options
author | =Corey Hulen <corey@hulen.com> | 2015-11-05 11:54:40 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-11-05 11:54:40 -0800 |
commit | 5dbefdecfe611f9496f9105a62e8f46ccb927add (patch) | |
tree | 582aad69109fc92d45e130c37338150b5df35a44 /web/templates/head.html | |
parent | 6418b78f1c8d7b9bba240ef5638e9e2a1613c3e5 (diff) | |
download | chat-5dbefdecfe611f9496f9105a62e8f46ccb927add.tar.gz chat-5dbefdecfe611f9496f9105a62e8f46ccb927add.tar.bz2 chat-5dbefdecfe611f9496f9105a62e8f46ccb927add.zip |
PLT-1016 force logout on other browsers
Diffstat (limited to 'web/templates/head.html')
-rw-r--r-- | web/templates/head.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/web/templates/head.html b/web/templates/head.html index a73e809a7..2bbf921ee 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -52,6 +52,15 @@ headers: { 'X-MM-TokenIndex': mm_session_token_index } }); } + + $(function () { + $(window).bind('storage', function (e) { + if (e.originalEvent.key === '__logout__') { + console.log('detected logout from a different tab'); + window.location.href = '/' + window.mm_team.name; + } + }); + }); </script> <script> |