We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d03315 commit 63b928dCopy full SHA for 63b928d
1 file changed
src/Analyser/Header/Useragent/Device/Gaming.js
@@ -17,6 +17,18 @@ class Gaming {
17
/* Nintendo Wii and DS */
18
19
static detectNintendo(ua) {
20
+ /* Switch */
21
+
22
+ if (/Nintendo Switch/u.test(ua)) {
23
+ this.data.os.reset();
24
+ this.data.device.setIdentification({
25
+ manufacturer: 'Nintendo',
26
+ model: 'Switch',
27
+ type: Constants.deviceType.GAMING,
28
+ subtype: Constants.deviceSubType.CONSOLE,
29
+ });
30
+ }
31
32
/* Wii */
33
34
if (/Nintendo Wii/u.test(ua)) {
@@ -172,7 +184,7 @@ class Gaming {
172
184
173
185
/* PlayStation 4 */
174
186
175
- if (/PlayStation 4/iu.test(ua)) {
187
+ if (/PlayStation 4/iu.test(ua) || /\(PS4/u.test(ua)) {
176
188
this.data.os.reset();
177
189
this.data.os.identifyVersion(/PlayStation 4 ([0-9.]*)/u, ua);
178
190
0 commit comments