fixed pushState urls

v1.18.x
Baris Soner Usakli 12 years ago
parent 069368fe88
commit 9f892c2e80

@ -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);

@ -98,8 +98,6 @@ var socket,
window.location.reload();
});
}
callback();
},
async: false
});

Loading…
Cancel
Save