Skip to content

Commit abee1fc

Browse files
sirocylheiskr
andauthored
Add ChromeOS support in defaultPlatform frontmatter (#4102)
* Add ChromeOS support Adds CrOS to defaultPlatform frontmatter, as Linux. * Update schema-event.js * Update schema-event.js Co-authored-by: Kevin Heis <heiskr@users.noreply.github.com>
1 parent aee29ee commit abee1fc

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

javascripts/display-platform-specific-content.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default function displayPlatformSpecificContent () {
1212
if (platform === 'darwin') platform = 'mac'
1313
if (platform === 'ios') platform = 'mac'
1414
if (platform === 'android') platform = 'linux'
15+
if (platform === 'cros') platform = 'linux'
1516
if (platform.startsWith('win')) platform = 'windows'
1617

1718
const platformsInContent = findPlatformSpecificContent(platform)

javascripts/user-agent.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const OS_REGEXPS = [
66
/(mac) os x ([^);]+)/i,
77
/(windows) ([^);]+)/i,
88
/(android) ([^);]+)/i,
9+
/(cros) ([^);]+)/i,
910
/(linux) ([^);]+)/i
1011
]
1112

lib/schema-event.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const context = {
7373
os: {
7474
type: 'string',
7575
description: 'The type of operating system the user is working with.',
76-
enum: ['windows', 'mac', 'linux', 'ios', 'android', 'other'],
76+
enum: ['windows', 'mac', 'linux', 'ios', 'android', 'cros', 'other'],
7777
default: 'other'
7878
},
7979
os_version: {

0 commit comments

Comments
 (0)