Skip to content

Commit 02af42f

Browse files
committed
Backport - Fix #682 - Add new browser: Smart Lenovo Browser (cherry picked from commit d565f65)
https://browser.lenovo.com.cn/
1 parent 57d1ac0 commit 02af42f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/ua-parser.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,8 @@
253253
], [VERSION, [NAME, 'IE']], [
254254
/ya(?:search)?browser\/([\w\.]+)/i // Yandex
255255
], [VERSION, [NAME, 'Yandex']], [
256+
/slbrowser\/([\w\.]+)/i // Smart Lenovo Browser
257+
], [VERSION, [NAME, 'Smart Lenovo '+BROWSER]], [
256258
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
257259
], [[NAME, /(.+)/, '$1 Secure '+BROWSER], VERSION], [
258260
/\bfocus\/([\w\.]+)/i // Firefox Focus

test/browser-test.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,26 @@
738738
"major" : "5"
739739
}
740740
},
741+
{
742+
"desc" : "Smart Lenovo Browser",
743+
"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",
744+
"expect" :
745+
{
746+
"name" : "Smart Lenovo Browser",
747+
"version" : "8.0.0.10171",
748+
"major" : "8"
749+
}
750+
},
751+
{
752+
"desc" : "Smart Lenovo Browser",
753+
"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",
754+
"expect" :
755+
{
756+
"name" : "Smart Lenovo Browser",
757+
"version" : "9.0.0.9011",
758+
"major" : "9"
759+
}
760+
},
741761
{
742762
"desc" : "LINE on Android",
743763
"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",

0 commit comments

Comments
 (0)