Reload all tabs when the user logs in or out

This commit is contained in:
yflory
2017-01-16 14:08:44 +01:00
parent efed1f5efe
commit a9063e0459
9 changed files with 69 additions and 21 deletions

View File

@@ -158,6 +158,18 @@ define([
logLevel: 1,
};
window.addEventListener('storage', function (e) {
var key = e.key;
if (e.key !== Cryptpad.userHashKey) { return; }
var o = e.oldValue;
var n = e.newValue;
if (!o && n) {
window.location.reload();
} else if (o && !n) {
window.location.reload();
}
});
var rt = window.rt = Listmap.create(listmapConfig);
exp.proxy = rt.proxy;
rt.proxy.on('create', function (info) {