From 560edb88458c5dbf3e8f419b746fde6c80c93990 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 1 Aug 2024 17:59:19 -0600 Subject: [PATCH] init --- gaia-landing.html | 26 ++++++++++++++++++++++++++ google-maps-landing.html | 26 ++++++++++++++++++++++++++ index.html | 16 +++++++++++++--- 3 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 gaia-landing.html create mode 100644 google-maps-landing.html diff --git a/gaia-landing.html b/gaia-landing.html new file mode 100644 index 0000000..00434d2 --- /dev/null +++ b/gaia-landing.html @@ -0,0 +1,26 @@ + + + + Redirecting to Gaia GPS... + + + + Redirecting to Gaia GPS... + + diff --git a/google-maps-landing.html b/google-maps-landing.html new file mode 100644 index 0000000..2462b29 --- /dev/null +++ b/google-maps-landing.html @@ -0,0 +1,26 @@ + + + + Redirecting to Google Maps... + + + + Redirecting to Google Maps... + + diff --git a/index.html b/index.html index 051e176..0028a5b 100644 --- a/index.html +++ b/index.html @@ -56,6 +56,10 @@ return result; } + function getReferrer() { + return document.referrer; + } + document.addEventListener('DOMContentLoaded', function() { if (!localStorage.getItem('consentGiven')) { document.getElementById('consent-banner').style.display = 'block'; @@ -63,8 +67,14 @@ document.getElementById('gaia-gps-link').addEventListener('click', function(event) { const token = generateToken(16); - localStorage.setItem('accessToken', token); - this.href = 'landing.html?token=' + token; + localStorage.setItem('gaiaAccessToken', token); + this.href = 'gaia-landing.html?token=' + token + '&referrer=' + encodeURIComponent(getReferrer()); + }); + + document.getElementById('google-maps-link').addEventListener('click', function(event) { + const token = generateToken(16); + localStorage.setItem('googleMapsAccessToken', token); + this.href = 'google-maps-landing.html?token=' + token + '&referrer=' + encodeURIComponent(getReferrer()); }); }); @@ -78,7 +88,7 @@

CSMS Claims and Neighbors


- View in Google Maps + View in Google Maps View in Gaia GPS