mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
Add PlayStation 4 browser support
This commit is contained in:
committed by
Denis Demchenko
parent
a81b8c0ed7
commit
383c627fc0
@@ -552,6 +552,23 @@ const browsersList = [
|
||||
},
|
||||
},
|
||||
|
||||
/* PlayStation 4 */
|
||||
{
|
||||
test: [/playstation 4/i],
|
||||
describe(ua) {
|
||||
const browser = {
|
||||
name: 'PlayStation 4',
|
||||
};
|
||||
const version = getFirstMatch(commonVersionIdentifier, ua);
|
||||
|
||||
if (version) {
|
||||
browser.version = version;
|
||||
}
|
||||
|
||||
return browser;
|
||||
},
|
||||
},
|
||||
|
||||
/* Safari */
|
||||
{
|
||||
test: [/safari|applewebkit/i],
|
||||
|
||||
@@ -150,4 +150,16 @@ export default [
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
/* Playstation 4 */
|
||||
{
|
||||
test: [/PlayStation 4/],
|
||||
describe(ua) {
|
||||
const version = getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, ua);
|
||||
return {
|
||||
name: 'PlayStation 4',
|
||||
version,
|
||||
};
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@@ -4,6 +4,7 @@ const TYPES_LABELS = {
|
||||
tablet: 'tablet',
|
||||
mobile: 'mobile',
|
||||
desktop: 'desktop',
|
||||
tv: 'tv',
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -232,4 +233,16 @@ export default [
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
/* PlayStation 4 */
|
||||
{
|
||||
test(parser) {
|
||||
return parser.getOSName(true) === 'playstation 4';
|
||||
},
|
||||
describe() {
|
||||
return {
|
||||
type: TYPES_LABELS.tv,
|
||||
};
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user