diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-11-06 10:18:13 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-11-06 10:18:13 -0500 |
commit | 982162ab0df0fc84032d61009b27b92283b1a242 (patch) | |
tree | 5efe0242f0d61f11b4d16718f9cd913db85bcab3 /web/templates/head.html | |
parent | 51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f (diff) | |
parent | 17cd95ae054b68a0f6816c6038f67a8901ac94d5 (diff) | |
download | chat-982162ab0df0fc84032d61009b27b92283b1a242.tar.gz chat-982162ab0df0fc84032d61009b27b92283b1a242.tar.bz2 chat-982162ab0df0fc84032d61009b27b92283b1a242.zip |
Merge pull request #1328 from mattermost/PLT-1016
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> |