Skip to content

Commit

Permalink
Incorporate Atmosphère version into navigator.userAgent
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Jun 24, 2024
1 parent b526c8e commit 54ff338
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/neat-goats-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nxjs-runtime": patch
---

Incorporate Atmosphère version into `navigator.userAgent`
9 changes: 8 additions & 1 deletion packages/runtime/src/navigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,14 @@ export class Navigator {
get userAgent() {
if (!state.ua) {
const { name, version } = Application.self;
state.ua = `${name}/${version} (Switch; en-us) nx.js/${$.version.nxjs}`;
const rv = [$.version.hos];
const ams = $.version.ams;
if (ams) {
rv.push(`AMS ${ams}`, $.version.emummc ? 'E' : 'S');
}
state.ua = `${name}/${version} (Switch; en-us; rv:${rv.join(
'|',
)}) nx.js/${$.version.nxjs}`;
}
return state.ua;
}
Expand Down

0 comments on commit 54ff338

Please sign in to comment.