fixed issue where calls to ajaxify.go were sending in a "template" argument that had since been removed, navigating back to NodeBB from an external link now no longer clobbers the History stack.

This commit is contained in:
Julian Lam
2014-01-24 09:48:41 -05:00
parent ef450edfea
commit b587d7b5ad
2 changed files with 7 additions and 6 deletions

View File

@@ -23,7 +23,6 @@ var ajaxify = {};
window.onpopstate = function (event) {
// "quiet": If set to true, will not call pushState
if (event !== null && event.state && event.state.url !== undefined) {
ajaxify.go(event.state.url, null, true);
}
@@ -34,6 +33,8 @@ var ajaxify = {};
ajaxify.currentPage = null;
ajaxify.go = function (url, callback, quiet) {
// "quiet": If set to true, will not call pushState
// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
$(window).off('scroll');
app.enterRoom('global');