Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit e28b391

Browse files
committed
Fix detection of Sony PlayStation.
1 parent 9723105 commit e28b391

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

platform.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,8 @@
417417
'Nexus',
418418
'Nook',
419419
'PlayBook',
420-
'PlayStation 3',
421-
'PlayStation 4',
422420
'PlayStation Vita',
421+
'PlayStation',
423422
'TouchPad',
424423
'Transformer',
425424
{ 'label': 'Wii U', 'pattern': 'WiiU' },
@@ -446,7 +445,7 @@
446445
'Nintendo': { 'Wii U': 1, 'Wii': 1 },
447446
'Nokia': { 'Lumia': 1 },
448447
'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },
449-
'Sony': { 'PlayStation 4': 1, 'PlayStation 3': 1, 'PlayStation Vita': 1 }
448+
'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 }
450449
});
451450

452451
/* Detectable operating systems (order is important). */

test/test.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,18 +1948,28 @@
19481948
'version': '0.0.1'
19491949
},
19501950

1951-
'PlayStation Browser (like Safari 4.x) on PlayStation 3 4.21': {
1951+
'PlayStation Browser (like Safari 4.x) on Sony PlayStation 3': {
19521952
'ua': 'Mozilla/5.0 (PLAYSTATION 3 4.21) AppleWebKit/531.22.8 (KHTML, like Gecko)',
19531953
'layout': 'NetFront',
1954+
'manufacturer': 'Sony',
19541955
'name': 'PlayStation Browser',
1955-
'product': 'PlayStation 3 4.21'
1956+
'product': 'PlayStation 3'
19561957
},
19571958

1958-
'PlayStation Browser (like Safari 6.x) on PlayStation 4 1.51': {
1959+
'PlayStation Browser (like Safari 6.x) on Sony PlayStation 4': {
19591960
'ua': 'Mozilla/5.0 (PlayStation 4 1.51) AppleWebKit/536.26 (KHTML, like Gecko)',
19601961
'layout': 'NetFront',
1962+
'manufacturer': 'Sony',
1963+
'name': 'PlayStation Browser',
1964+
'product': 'PlayStation 4'
1965+
},
1966+
1967+
'PlayStation Browser (like Safari 7.x) on Sony PlayStation 4': {
1968+
'ua': 'Mozilla/5.0 (PlayStation 4 3.00) AppleWebKit/537.73 (KHTML, like Gecko)',
1969+
'layout': 'NetFront',
1970+
'manufacturer': 'Sony',
19611971
'name': 'PlayStation Browser',
1962-
'product': 'PlayStation 4 1.51'
1972+
'product': 'PlayStation 4'
19631973
},
19641974

19651975
'Raven 0.5.8635 on OS X 10.7.1': {

0 commit comments

Comments
 (0)