added regex matching to templates/ajaxify. needs cleanup, just unblocking baris

This commit is contained in:
psychobunny
2013-05-08 16:33:29 +00:00
parent 36e7baa84d
commit 31e845f4b0
3 changed files with 17 additions and 10 deletions

View File

@@ -31,8 +31,9 @@ var ajaxify = {};
app.enter_room('global');
var url = url.replace(/\/$/, "");
var tpl_url = (url === '' || url === '/') ? 'home' : url.split('/')[0];
tpl_url = templates.get_custom_map(tpl_url);
var tpl_url = (url === '' || url === '/') ? 'home' : url.split('/')[0];
if (templates[tpl_url]) {
window.history.pushState({}, url, "/" + url);