Skip to content

Commit d565f65

Browse files
committed
Fix #682 - Add new browser: Smart Lenovo Browser
https://browser.lenovo.com.cn/
1 parent 69ed6ce commit d565f65

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/main/ua-parser.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
BLACKBERRY = 'BlackBerry',
7171
GOOGLE = 'Google',
7272
HUAWEI = 'Huawei',
73+
LENOVO = 'Lenovo',
7374
LG = 'LG',
7475
MICROSOFT = 'Microsoft',
7576
MOTOROLA = 'Motorola',
@@ -326,6 +327,8 @@
326327
], [VERSION, [NAME, 'IE']], [
327328
/ya(?:search)?browser\/([\w\.]+)/i // Yandex
328329
], [VERSION, [NAME, 'Yandex']], [
330+
/slbrowser\/([\w\.]+)/i // Smart Lenovo Browser
331+
], [VERSION, [NAME, 'Smart ' + LENOVO + SUFFIX_BROWSER]], [
329332
/(avast|avg)\/([\w\.]+)/i // Avast/AVG Secure Browser
330333
], [[NAME, /(.+)/, '$1 Secure' + SUFFIX_BROWSER], VERSION], [
331334
/\bfocus\/([\w\.]+)/i // Firefox Focus
@@ -540,7 +543,7 @@
540543
// Lenovo
541544
/(ideatab[-\w ]+)/i,
542545
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
543-
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [
546+
], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [
544547

545548
// Nokia
546549
/(?:maemo|nokia).*(n900|lumia \d+)/i,

test/specs/browser-all.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,26 @@
748748
"major" : "5"
749749
}
750750
},
751+
{
752+
"desc" : "Smart Lenovo Browser",
753+
"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",
754+
"expect" :
755+
{
756+
"name" : "Smart Lenovo Browser",
757+
"version" : "8.0.0.10171",
758+
"major" : "8"
759+
}
760+
},
761+
{
762+
"desc" : "Smart Lenovo Browser",
763+
"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",
764+
"expect" :
765+
{
766+
"name" : "Smart Lenovo Browser",
767+
"version" : "9.0.0.9011",
768+
"major" : "9"
769+
}
770+
},
751771
{
752772
"desc" : "LINE on Android",
753773
"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)