From 71c8155599ea59cb4acb888843fadfa43c21e2c5 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 15 Feb 2015 13:13:13 +0100 Subject: Fix contact flash when loading a page --- script.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'script.js') diff --git a/script.js b/script.js index 07feacd..e662ebb 100644 --- a/script.js +++ b/script.js @@ -23,10 +23,12 @@ }; function router() { - var url = location.hash.slice(2) || 'presentation'; - fetchFile('Pages/' + url + '.html', function(htmlData) { - var viewElement = document.getElementById('content'); - viewElement.innerHTML = htmlData; + var url = location.hash.slice(1) || 'presentation'; + var contentElement = document.getElementById('content'); + fetchFile('Pages' + url + '.html', function(contentData) { + fetchFile('Pages/contact.html', function(contactData) { + contentElement.innerHTML = contentData + contactData; + }); }); } -- cgit v1.2.3