Skip to content

Commit

Permalink
Backport - Fix #682 - Add new browser: Smart Lenovo Browser (cherry p…
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalman committed Oct 27, 2023
1 parent 57d1ac0 commit 02af42f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ua-parser.js
Expand Up @@ -253,6 +253,8 @@
], [VERSION, [NAME, 'IE']], [
/ya(?:search)?browser\/([\w\.]+)/i // Yandex
], [VERSION, [NAME, 'Yandex']], [
/slbrowser\/([\w\.]+)/i // Smart Lenovo Browser
], [VERSION, [NAME, 'Smart Lenovo '+BROWSER]], [
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
], [[NAME, /(.+)/, '$1 Secure '+BROWSER], VERSION], [
/\bfocus\/([\w\.]+)/i // Firefox Focus
Expand Down
20 changes: 20 additions & 0 deletions test/browser-test.json
Expand Up @@ -738,6 +738,26 @@
"major" : "5"
}
},
{
"desc" : "Smart Lenovo Browser",
"ua" : "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 SLBrowser/8.0.0.10171 SLBChan/8",
"expect" :
{
"name" : "Smart Lenovo Browser",
"version" : "8.0.0.10171",
"major" : "8"
}
},
{
"desc" : "Smart Lenovo Browser",
"ua" : "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 SLBrowser/9.0.0.9011 SLBChan/10",
"expect" :
{
"name" : "Smart Lenovo Browser",
"version" : "9.0.0.9011",
"major" : "9"
}
},
{
"desc" : "LINE on Android",
"ua" : "Mozilla/5.0 (Linux; Android 5.0; ASUS_Z00AD Build/LRX21V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/51.0.2704.81 Mobile Safari/537.36 Line/6.5.1/IAB",
Expand Down

0 comments on commit 02af42f

Please sign in to comment.