summaryrefslogtreecommitdiffstats
path: root/web/templates/head.html
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-06 10:18:13 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-06 10:18:13 -0500
commit982162ab0df0fc84032d61009b27b92283b1a242 (patch)
tree5efe0242f0d61f11b4d16718f9cd913db85bcab3 /web/templates/head.html
parent51da1b1ca1ff92fcfcdb70c46236f10ee3d20a3f (diff)
parent17cd95ae054b68a0f6816c6038f67a8901ac94d5 (diff)
downloadchat-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.html9
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>