From 6b7f28bc46dfa99f53bca8d9912b96b65e96d34b Mon Sep 17 00:00:00 2001 From: CommanderRedYT Date: Sat, 7 Nov 2020 13:53:37 +0100 Subject: [PATCH] Added support for 127.0.0.1 developement --- about.html | 2 +- careers.html | 2 +- index.html | 3 +-- js/addToURL.js | 21 +++++++++++++++++++++ navbar.html | 2 +- news.html | 2 +- vehicles.html | 6 +++--- 7 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 js/addToURL.js diff --git a/about.html b/about.html index 79cff84..94890be 100644 --- a/about.html +++ b/about.html @@ -80,7 +80,7 @@ - + diff --git a/careers.html b/careers.html index 859ea7d..e683077 100644 --- a/careers.html +++ b/careers.html @@ -80,7 +80,7 @@ - + diff --git a/index.html b/index.html index f1cc84c..2331e1c 100644 --- a/index.html +++ b/index.html @@ -75,7 +75,7 @@ - + @@ -177,7 +177,6 @@ --> - \ No newline at end of file diff --git a/js/addToURL.js b/js/addToURL.js new file mode 100644 index 0000000..e0a10f5 --- /dev/null +++ b/js/addToURL.js @@ -0,0 +1,21 @@ +function addHTML() { + + if (window.location.protocol == 'file:' || window.location.hostname == '127.0.0.1') { + var filename = document.getElementById("addhtml") + filename += ".html" + document.getElementById("addhtml").href = filename; + console.log(filename); + return false; + } +} + +function addIndex() { + + if (window.location.protocol == 'file:' || window.location.hostname == '127.0.0.1') { + var filename = document.getElementById("addindex") + filename += "index.html" + document.getElementById("addindex").href = filename; + console.log(filename); + return false; + } +} \ No newline at end of file diff --git a/navbar.html b/navbar.html index 8cbe5d6..f471def 100644 --- a/navbar.html +++ b/navbar.html @@ -58,7 +58,7 @@ - + diff --git a/news.html b/news.html index e00b273..ea1beae 100644 --- a/news.html +++ b/news.html @@ -80,7 +80,7 @@ - + diff --git a/vehicles.html b/vehicles.html index 05ae354..09d3552 100644 --- a/vehicles.html +++ b/vehicles.html @@ -52,9 +52,9 @@ >Home (current) - - +