|
|
|
@ -25,13 +25,6 @@ var ajaxify = {};
|
|
|
|
|
if (event !== null && event.state && event.state.url !== undefined) ajaxify.go(event.state.url, null, null, true);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function generatePushUrl(url) {
|
|
|
|
|
if(url.indexOf(RELATIVE_PATH.slice(1)) === -1)
|
|
|
|
|
return RELATIVE_PATH + '/' + url;
|
|
|
|
|
else
|
|
|
|
|
return url.slice(RELATIVE_PATH.length);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ajaxify.go = function(url, callback, template, quiet) {
|
|
|
|
|
// leave room and join global
|
|
|
|
|
app.enter_room('global');
|
|
|
|
@ -59,7 +52,7 @@ var ajaxify = {};
|
|
|
|
|
if (quiet !== true) {
|
|
|
|
|
window.history.pushState({
|
|
|
|
|
"url": url
|
|
|
|
|
}, url, generatePushUrl(url));
|
|
|
|
|
}, url, RELATIVE_PATH + "/" + url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
jQuery('#footer, #content').fadeOut(100);
|
|
|
|
|