From c1b5919106bf41a65f1b12d860be29dcfbf7ad6e Mon Sep 17 00:00:00 2001 From: Luke Prior <22492406+LukePrior@users.noreply.github.com> Date: Wed, 28 Aug 2024 02:31:13 +0900 Subject: [PATCH 1/2] Update main.js --- site/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/main.js b/site/main.js index 7f34cb7790..fdbcdab86b 100644 --- a/site/main.js +++ b/site/main.js @@ -24,7 +24,7 @@ L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r var urlParams = new URLSearchParams(window.location.search); var default_suburb = null; var default_state = null; -var default_commit = "main"; +var default_commit = "latest"; var combined_info = null; if (urlParams.has("suburb") && urlParams.has("state")) { default_suburb = urlParams.get("suburb"); @@ -244,7 +244,7 @@ function loadSuburb(state_file, commit, first_load=false) { if (state_file == "") { return; } - url = "https://raw.githubusercontent.com/LukePrior/nbn-upgrade-map/" + commit + "/results/" + state_file + ".geojson" + url = "https://cdn.jsdelivr.net/gh/LukePrior/nbn-upgrade-map@" + commit + "/results/" + state_file + ".geojson" default_state = state_file.split('/')[0] default_suburb = state_file.split('/')[1] default_commit = commit From 5fccfecc43b6506956b33faec0a6f25c9d4d033e Mon Sep 17 00:00:00 2001 From: Luke Prior <22492406+LukePrior@users.noreply.github.com> Date: Wed, 28 Aug 2024 02:35:01 +0900 Subject: [PATCH 2/2] Update main.js --- site/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/site/main.js b/site/main.js index fdbcdab86b..da2e01ecb5 100644 --- a/site/main.js +++ b/site/main.js @@ -32,6 +32,7 @@ if (urlParams.has("suburb") && urlParams.has("state")) { } if (urlParams.has("commit")) { default_commit = urlParams.get("commit"); + default_commit = default_commit == "main" ? "latest" : default_commit; } if (window.matchMedia('(display-mode: standalone)').matches) {