mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
small refactor of routing, cleanup, templates are now parsed entirely on client side for /, /register, /login for now
This commit is contained in:
@@ -22,7 +22,7 @@ var ajaxify = {};
|
||||
|
||||
ajaxify.go = function(url, callback) {
|
||||
var url = url.replace(/\/$/, "");
|
||||
var tpl_url = (url === '') ? 'home' : url.split('/')[0];
|
||||
var tpl_url = (url === '' || url === '/') ? 'home' : url.split('/')[0];
|
||||
|
||||
if (templates[tpl_url]) {
|
||||
window.history.pushState({}, url, "/" + url);
|
||||
|
||||
Reference in New Issue
Block a user