From f7e5ce933d57e4fe429c4a5f75bab7bc748f36a0 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Sun, 20 Sep 2020 22:10:13 +0200 Subject: [PATCH] Add better detection of buurtnatuur --- index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index bf29f92..fbbf3a5 100644 --- a/index.ts +++ b/index.ts @@ -18,6 +18,12 @@ if (location.href.startsWith("http://buurtnatuur.be")) { window.location.replace("https://buurtnatuur.be"); } +let defaultLayout = "bookcases" +if (location.href.indexOf("buurtnatuur.be") >= 0) { + // Reload the https version. This is important for the 'locate me' button + defaultLayout = "buurtnatuur" +} + let testing: UIEventSource; @@ -35,7 +41,7 @@ if (location.hostname === "localhost" || location.hostname === "127.0.0.1") { // ----------------- SELECT THE RIGHT QUESTSET ----------------- -let defaultLayout = "bookcases" + const path = window.location.pathname.split("/").slice(-1)[0]; if (path !== "index.html" && path !== "") {