diff options
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> |