diff --git a/public/src/ajaxify.js b/public/src/ajaxify.js index 971f9aef71..ac3d7d4db0 100644 --- a/public/src/ajaxify.js +++ b/public/src/ajaxify.js @@ -25,27 +25,20 @@ var ajaxify = {}; var tpl_url = (url === '') ? 'home' : url; if (templates[tpl_url]) { - if (current_state === null || current_state != url) { - current_state = url; - - window.history.pushState({}, url, "/" + url); - - jQuery('#content, #footer').fadeOut(150, function() { - //content.innerHTML = templates[tpl_url]; - load_template(function() { - exec_body_scripts(content); - - ajaxify.enable(); - if (callback) { - callback(); - } - - jQuery('#content, #footer').fadeIn(200); - }); - - }); + window.history.pushState({}, url, "/" + url); + + jQuery('#content, #footer').fadeOut(100); + + load_template(function() { + exec_body_scripts(content); + + ajaxify.enable(); + if (callback) { + callback(); + } - } + jQuery('#content, #footer').fadeIn(200); + }); return true; } diff --git a/public/templates/home.tpl b/public/templates/home.tpl index 35b4880009..3149404251 100644 --- a/public/templates/home.tpl +++ b/public/templates/home.tpl @@ -1,10 +1,10 @@