From 1b3fdf173a9d4428721f714ad6fa41e87f1f229c Mon Sep 17 00:00:00 2001 From: jackpoll Date: Tue, 3 Dec 2013 15:05:17 +0200 Subject: [PATCH] Add device detection for Lenovo tablet Lenovo tablet detection is missing. example userAgent: "Mozilla/5.0 (Linux; Android 4.0.3; IdeaTab A2107A-F Build/ IML74K) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19" --- src/ua-parser.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ua-parser.js b/src/ua-parser.js index 37e1bd2..252fc9c 100644 --- a/src/ua-parser.js +++ b/src/ua-parser.js @@ -376,7 +376,10 @@ /((nexus\s4))/i, /(lg)[e;\s-\/]+(\w+)*/i ], [[VENDOR, 'LG'], MODEL, [TYPE, MOBILE]], [ - + + /android.+((IdeaTab[A-Za-z0-9\-\s]+))/i // Lenovo + ], [[VENDOR, 'Lenovo'], MODEL, [TYPE, TABLET]], [ + /(mobile|tablet);.+rv\:.+gecko\//i // Unidentifiable ], [TYPE, VENDOR, MODEL] ],