Site: point Mac visitors at Sidecar instead of a dead end - #29
Merged
Conversation
EternalMonitor is Windows-only, but nothing on the site said so above the fold, so Mac visitors had to read the subtitle or hit the download page to find out. Show them a dismissible notice naming the free native option that already solves their problem. Detection requires platform "Mac" AND maxTouchPoints <= 1: iPadOS reports "MacIntel" as its platform, and iPad users are the audience, not the ones to turn away. Dismissal is stored in sessionStorage, so it does not nag while browsing but returns on a fresh visit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Mac visitors to eternalmonitor.dev now get a dismissible notice at the bottom of the page: EternalMonitor is Windows-only for now, and macOS already does this natively for free via Sidecar.
Previously nothing above the fold said "Windows-only" — you had to read the hero subtitle or reach the download page to find out.
How
docs/script.js— injects the notice on both pages (the script is shared).docs/style.css—.mac-noticestyling, using the existing design tokens.Two details worth calling out:
platformcontains "Mac" ANDmaxTouchPoints <= 1. iPadOS reports its platform asMacIntel; a naive platform check would show "Mac isn't supported" to the exact users the product is built for.sessionStorage, notlocalStorage— it stops nagging while browsing but reappears on a fresh visit.Verification
Rendered locally in Chrome on macOS on both
index.htmlanddownload.html; notice appears, the Sidecar link resolves, and dismissal sticks for the session.Not verified: iPad rendering (behavior comes from the
maxTouchPointsguard, not observed on-device).