Homecoming Football ’24

Dane Early ’31, Shepherd Teillon ’31, Tucker Hart ’31, Reed Foley ’30

Add to Homescreen Popup body { margin: 0; padding: 0; } .popup-container { position: fixed; bottom: 20px; right: 20px; background-color: #fff; color: #333; border: 1px solid #ddd; border-radius: 10px; padding: 10px 15px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); z-index: 1000; display: none; /* Initially hidden */ flex-direction: row; align-items: center; } .popup-message { font-size: 14px; margin-right: 10px; } .popup-message img { width: 20px; height: auto; vertical-align: middle; margin-right: 5px; } .close-button { color: #fff; border: none; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.5s; } .close-button:hover { transform: translate(2px, -2px) !important; } const DISMISSAL_KEY = ‘popupDismissed’; const DISMISSAL_PERIOD = 7 * 24 * 60 * 60 * 1000; // 1 week in milliseconds // Check if the user is on iOS function isIos() { const userAgent = window.navigator.userAgent.toLowerCase(); return /iphone|ipad|ipod/.test(userAgent); } // Check if the app is already in standalone mode function isInStandaloneMode() { return window.matchMedia(‘(display-mode: standalone)’).matches || window.navigator.standalone === true; } // Determine if the popup should show function shouldShowPopup() { const lastDismissal = localStorage.getItem(DISMISSAL_KEY); if (lastDismissal) { const now = Date.now(); return now – lastDismissal > DISMISSAL_PERIOD; // Show only if one week has passed } return true; // Show if no dismissal has been recorded } // Show the popup function showPopup() { const popup = document.getElementById(‘iosPopup’); if (isIos() && !isInStandaloneMode() && shouldShowPopup()) { popup.style.display = ‘flex’; // Show the popup } } // Dismiss the popup and store the dismissal time function dismissPopup() { const popup = document.getElementById(‘iosPopup’); popup.style.display = ‘none’; localStorage.setItem(DISMISSAL_KEY, Date.now()); // Record dismissal time } // Show the popup on page load window.onload = showPopup;

Wick Word © 2021-2025