Skip to content

Commit

Permalink
Add Snapchat user agent.
Browse files Browse the repository at this point in the history
  • Loading branch information
JBYoshi committed Jun 3, 2023
1 parent 072a82b commit 2b0c661
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/ua-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i, // Naver InApp
/safari (line)\/([\w\.]+)/i, // Line App for iOS
/\b(line)\/([\w\.]+)\/iab/i, // Line App for Android
/(chromium|instagram)[\/ ]([-\w\.]+)/i // Chromium/Instagram
/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i // Chromium/Instagram/Snapchat
], [NAME, VERSION], [
/\bgsa\/([\w\.]+) .*safari\//i // Google Search Appliance on iOS
], [VERSION, [NAME, 'GSA']], [
Expand Down
10 changes: 10 additions & 0 deletions test/specs/browser-all.json
Original file line number Diff line number Diff line change
Expand Up @@ -1869,5 +1869,15 @@
"version" : "41.0",
"major" : "41"
}
},
{
"desc" : "Snapchat",
"ua" : "Mozilla/5.0 (iPhone; CPU iPhone OS 16_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Snapchat/12.33.0.36 (like Safari/8614.1.25.0.31, panda)",
"expect" :
{
"name" : "Snapchat",
"version" : "12.33.0.36",
"major" : "12"
}
}
]

0 comments on commit 2b0c661

Please sign in to comment.