Skip to content

Commit

Permalink
[extensions] Create a new list for Vehicles user-agent: Volvo, Rivi…
Browse files Browse the repository at this point in the history
…an, BYD
  • Loading branch information
faisalman committed Dec 21, 2024
1 parent 20e8740 commit e8a3012
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/extensions/ua-parser-extensions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ export const Emails: UAParserExt;
export const Fetchers: UAParserExt;
export const InApps: UAParserExt;
export const Libraries: UAParserExt;
export const MediaPlayers: UAParserExt;
export const MediaPlayers: UAParserExt;
export const Vehicles: UAParserExt;
21 changes: 20 additions & 1 deletion src/extensions/ua-parser-extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,24 @@ const Libraries = Object.freeze({
]
});

/////////////
// VEHICLES
////////////

const Vehicles = Object.freeze({
device : [
[
/dilink.+(byd) auto/i, // BYD
], [VENDOR], [

/(rivian) (r1t)/i, // Rivian
], [VENDOR, MODEL], [

/vcc.+netfront/i, // Volvo
], [[VENDOR, 'Volvo']]
]
});

//////////
// BOTS
/////////
Expand All @@ -343,5 +361,6 @@ module.exports = {
Fetchers,
InApps,
Libraries,
MediaPlayers
MediaPlayers,
Vehicles
};

0 comments on commit e8a3012

Please sign in to comment.