Bookmarkable room URLs

This commit is contained in:
David Baker 2015-07-20 12:20:17 -07:00
parent dcecdc8260
commit 36b1280f0c
2 changed files with 16 additions and 0 deletions

View file

@ -40,9 +40,17 @@ function routeUrl(location) {
}
}
window.matrixChat.showScreen('register', params);
} else {
window.matrixChat.showScreen(location.hash.substring(2));
}
}
function onHashChange(ev) {
routeUrl(window.location);
}
window.addEventListener('hashchange', onHashChange);
var loaded = false;
window.onload = function() {