Skip to main content

Module platform

Module platform 

Source
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_of in JavaScript: systemOf(userAgent, platform, uaPlatform, maxTouchPoints) returns System::name. landing_page::the_os_script_reads_the_system_as_the_app_does holds 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_JS is this function in JavaScript, for the prerendered page.