Update index.html

This commit is contained in:
Daniel LaForce 2024-08-01 22:07:21 -06:00
parent acfd10d20a
commit bf314c09fd
1 changed files with 7 additions and 4 deletions

View File

@ -59,8 +59,8 @@
</head>
<body>
<h1>CSMS Claims and Neighbors</h1>
<iframe src="https://csms.argobox.com/redirect/google-maps"></iframe>
<iframe src="https://csms.argobox.com/redirect/gaia-gps"></iframe>
<iframe id="google-maps-iframe" src="https://csms.argobox.com/redirect/google-maps"></iframe>
<iframe id="gaia-gps-iframe" src="https://csms.argobox.com/redirect/gaia-gps"></iframe>
<div id="button-container">
<a href="#" class="button" id="google-maps-link">View in Google Maps</a>
<a href="#" class="button" id="gaia-gps-link">View in Gaia GPS</a>
@ -84,6 +84,9 @@
document.getElementById('consent-banner').style.display = 'block';
}
const googleMapsIframe = document.getElementById('google-maps-iframe');
const gaiaGpsIframe = document.getElementById('gaia-gps-iframe');
document.getElementById('gaia-gps-link').addEventListener('click', function(event) {
event.preventDefault();
const token = generateToken(16);
@ -94,7 +97,7 @@
'event_label': 'Gaia GPS',
'value': url
});
window.location.href = url;
gaiaGpsIframe.src = url;
});
document.getElementById('google-maps-link').addEventListener('click', function(event) {
@ -107,7 +110,7 @@
'event_label': 'Google Maps',
'value': url
});
window.location.href = url;
googleMapsIframe.src = url;
});
});