Expand description
The visitor’s system, read from what their browser says, so the front page shows the install that runs on it.
Structs§
- Seen
- What the browser says about the machine it runs on.
Enums§
- System
- The systems the front page tells apart.
Constants§
- REMEMBERED
- Where the page remembers the install a visitor chose with the switch, in their browser alone.
- SYSTEM_
OF_ JS system_ofin JavaScript:systemOf(userAgent, platform, uaPlatform, maxTouchPoints)returnsSystem::name.landing_page::the_os_script_reads_the_system_as_the_app_doesholds the two to the same answers for every visitor of the fixture.
Functions§
- choose_
install - Show
install’s prompt, and remember the choice in this browser when it lets the page. - install_
for - The install that runs on
system: PowerShell on Windows, the shell script everywhere else. A phone’s reader pastes into an agent on a Mac or a Linux machine, or into a cloud agent, which runs in a Linux sandbox. - os_
script - The script the prerendered front page runs before its hero paints:
<html>gets the visitor’s system (data-system) and the install to show (data-os), the one they chose last time if they chose one, so the page shows the right prompt with no flash and no jump. - shown_
install - The install the page shows: what
<html data-os>says, else what the app reads of the browser and the visitor’s last choice, marking<html>with it as the inline script would have. Off the browser, the shell install. - system_
of - The system a browser runs on. Phones and tablets first: Android says Linux, and an iPad asking for
the desktop site says it is a Mac with a touch screen.
SYSTEM_OF_JSis this function in JavaScript, for the prerendered page.