From e9065b9c29e9a0da334927fa2a0d6f9fc7db66f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Sat, 15 Jun 2013 08:36:45 +0200 Subject: [PATCH] Little code refactoring and handle the case of going back to the first page visited. re #73 --- index.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 8663986..19f0063 100644 --- a/index.php +++ b/index.php @@ -117,11 +117,8 @@ $.get('templates/default/frontpage.html', function(data){ template = doT.template(data); $.getJSON('', function(data) { - result = template (data); - document.title = data.title; - $(".container").html (result); - - ajaxifyLinks (); + updatePage (data); + history.replaceState(data, "", window.location); }); }); });