add Safari incompatibility warning

Hunter
Monday, January 26th, 2026 at 1:22 PM

readme.md+3 
script.js+27-4

readme.md
25  | Original<br>Cousin<br>HON A6<br>HON A5<br>Original Avec<br>Cousin Avec<br>5-Year Techo A6<br>5-Year Techo A5<br>Day-Free A6<br>Day-Free A5 | [Use 3.7mm grid ↗](https://hunterirving.github.io/memori?grid-size=3.7mm) |
26  | Weeks<br>Weeks Mega | [Use 3.55mm grid ↗](https://hunterirving.github.io/memori?grid-size=3.55mm) |
27  
28 +> [!IMPORTANT]
29 +> Printing from Safari is not currently supported. Please use Firefox or Chrome instead.
30 +
31  ### controls
32  
33  - After opening memori in your web browser, drag one or more images from your desktop onto the grid.<br>
script.js
  42  let popupElement = null;
  43  let popupTimeout = null;
  44  
  45 +// Detect Safari browser
  46 +function isSafari() {
  47 +	const ua = navigator.userAgent;
  48 +	return ua.includes('Safari') && !ua.includes('Chrome') && !ua.includes('Chromium');
  49 +}
  50 +
  51 +const isUsingSafari = isSafari();
  52 +
  53  // Parse URL parameters for custom cell size
  54  function parseCellSizeFromURL() {
  55  	const urlParams = new URLSearchParams(window.location.search);

  62  
  63  		// Check if size is valid
  64  		if (isNaN(size)) {
     -			showPopup('Invalid grid size. Using default 4mm.', 3000);
  65 +			if (!isUsingSafari) {
  66 +				showPopup('Invalid grid size. Using default 4mm.', 3000);
  67 +			}
  68  			return 4;
  69  		}
  70  
  71  		// Check if size is within reasonable bounds
  72  		if (size < MIN_CELL_SIZE_MM || size > MAX_CELL_SIZE_MM) {
     -			showPopup(`Grid size must be between ${MIN_CELL_SIZE_MM}mm and ${MAX_CELL_SIZE_MM}mm. Using default 4mm.`, 3500);
  73 +			if (!isUsingSafari) {
  74 +				showPopup(`Grid size must be between ${MIN_CELL_SIZE_MM}mm and ${MAX_CELL_SIZE_MM}mm. Using default 4mm.`, 3500);
  75 +			}
  76  			return 4;
  77  		}
  78  
     -		// Valid size
     -		showPopup(`Grid set to ${size}mm`);
  79 +		// Valid size - only show popup if not Safari
  80 +		if (!isUsingSafari) {
  81 +			showPopup(`Grid set to ${size}mm`);
  82 +		}
  83  		return size;
  84  	}
  85  

1159  // Load theme on page load
1160  loadThemeFromLocalStorage();
1161  
1162 +// Show Safari warning if applicable
1163 +if (isUsingSafari) {
1164 +	const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
1165 +	const safariMessage = isMobile
1166 +		? 'Printing from Safari is not currently supported.'
1167 +		: 'Printing from Safari is not currently supported. Please use Firefox or Chrome instead.';
1168 +	showPopup(safariMessage, 5000);
1169 +}
1170 +
1171  // Warn before leaving page if images are present
1172  window.addEventListener('beforeunload', (e) => {
1173  	if (images.length > 0) {