Real-Time Arrivals, Alerts
and more
at your finger tips!
/* ========== Menu, Ads and Tracking ### CSS .control-bar { display: flex; height: 30px; width:414px; align-items: center; justify-content: space-around; border:1px solid black; background-color: #333; color: white; } .control-bar div { /* border: 1px solid white; */ padding: 1.5% 4%; } .control-bar div:hover { background-color: #aaa; color: black; } .ad-banner { position: relative; left: 50px; width: 320px; height: 50px; background-color: cornflowerblue; } ### HTML
### SCRIPT let lat = 40.748440 let lon = -73.985664 let ua = window.navigator.userAgent; let now = new Date(); user_track = {lat, lon, ua, now} let uuid = null; console.log(user_track); console.log('uuid1: ' + uuid); if ( !localStorage.getItem('uuid') ) { console.log('Setting uuid.'); uuid = uuidv4(); localStorage.setItem('uuid', uuid); user_track['uuid'] = uuid; } else { uuid = localStorage.getItem('uuid'); user_track['uuid'] = uuid; } console.log('uuid2: ' + uuid); sendTrack(user_track); // // Generate a random UUID // const random_uuid = uuidv4(); // // Print the UUID // console.log(random_uuid); function uuidv4() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' .replace(/[xy]/g, function (c) { const r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8); return v.toString(16); }); } function sendTrack(track) { console.log("Sending Track:", track); } */