Update index.html

This commit is contained in:
Daniel LaForce 2024-08-01 20:49:49 -06:00
commit 408ee6f1ee
1 changed files with 3 additions and 22 deletions

View File

@ -1,3 +1,4 @@
<!-- Example conflict resolution -->
<!DOCTYPE html>
<html>
<head>
@ -59,8 +60,8 @@
</head>
<body>
<h1>CSMS Claims and Neighbors</h1>
<iframe src="/redirect/google-maps" id="google-maps-iframe"></iframe>
<iframe src="/redirect/gaia-gps" id="gaia-gps-iframe"></iframe>
<iframe src="/redirect/google-maps"></iframe>
<iframe src="/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>
@ -87,10 +88,8 @@
document.getElementById('gaia-gps-link').addEventListener('click', function(event) {
event.preventDefault();
const token = generateToken(16);
console.log('Generated token for Gaia GPS:', token); // Debug line
localStorage.setItem('gaiaAccessToken', token);
const url = `/redirect/gaia-gps?token=${token}`;
console.log('Redirecting to:', url); // Debug line
gtag('event', 'click', {
'event_category': 'Outbound Link',
'event_label': 'Gaia GPS',
@ -102,10 +101,8 @@
document.getElementById('google-maps-link').addEventListener('click', function(event) {
event.preventDefault();
const token = generateToken(16);
console.log('Generated token for Google Maps:', token); // Debug line
localStorage.setItem('googleMapsAccessToken', token);
const url = `/redirect/google-maps?token=${token}`;
console.log('Redirecting to:', url); // Debug line
gtag('event', 'click', {
'event_category': 'Outbound Link',
'event_label': 'Google Maps',
@ -113,22 +110,6 @@
});
window.location.href = url;
});
document.getElementById('google-maps-iframe').addEventListener('load', function() {
console.log('Google Maps iframe loaded successfully.');
});
document.getElementById('gaia-gps-iframe').addEventListener('load', function() {
console.log('Gaia GPS iframe loaded successfully.');
});
document.getElementById('google-maps-iframe').addEventListener('error', function() {
console.error('Error loading Google Maps iframe.');
});
document.getElementById('gaia-gps-iframe').addEventListener('error', function() {
console.error('Error loading Gaia GPS iframe.');
});
});
function acceptConsent() {