Change the hash in the address bar when browsing a shared folder

This commit is contained in:
yflory
2018-09-17 15:10:10 +02:00
parent 38daf4676c
commit f662036817
3 changed files with 17 additions and 2 deletions

View File

@@ -87,6 +87,14 @@ define([
cb(obj);
});
});
sframeChan.on('EV_DRIVE_SET_HASH', function (hash) {
// Update the hash in the address bar
var ohc = window.onhashchange;
window.onhashchange = function () {};
window.location.hash = hash || '';
window.onhashchange = ohc;
ohc({reset:true});
});
Cryptpad.onNetworkDisconnect.reg(function () {
sframeChan.event('EV_NETWORK_DISCONNECT');
});