diff --git a/README.md b/README.md index efae98a..9419541 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ info.description; // 'Opera 11.52 (identifying as Firefox 4.0) on Mac OS X 10.7. ``` ## Support -Tested in Chrome 46-47, Firefox 42-43, IE 8-11, MS Edge 13, Safari 8-9, Node.js 0.8.28, 0.10.41, 0.12.9, 4.2.4, & 5.3.0, & PhantomJS 1.9.8. +Tested in Chrome 46-47, Firefox 42-43, IE 8-11, Edge 13, Safari 8-9, Node.js 0.10.x, 0.12.x, 4.x, & 5.x, & PhantomJS 1.9.8. ## BestieJS diff --git a/platform.js b/platform.js index 782b185..1cef406 100644 --- a/platform.js +++ b/platform.js @@ -418,6 +418,7 @@ 'PlayStation 3', 'PlayStation 4', 'PlayStation Vita', + { 'label': 'Surface RT', 'pattern': 'Tablet PC 2.0'}, 'TouchPad', 'Transformer', { 'label': 'Wii U', 'pattern': 'WiiU' }, @@ -703,6 +704,12 @@ description.unshift('desktop mode'); version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]); } + // Detect IE 11 Mobile (Surface). + else if (/\bTablet PC\b/i.test(ua)) { + name = 'IE Mobile'; + os = 'Windows RT 8.1'; + version || (version = (/\brv:([\d.]+)/.exec(ua) || 0)[1]); + } // Detect IE 11. else if (name != 'IE' && layout == 'Trident' && (data = /\brv:([\d.]+)/.exec(ua))) { if (name) { diff --git a/test/test.js b/test/test.js index 737cd67..a473b84 100644 --- a/test/test.js +++ b/test/test.js @@ -1336,6 +1336,15 @@ 'version': '11.0' }, + 'IE Mobile 11.0 on Surface RT (Windows RT 8.1)': { + 'ua': 'Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; .NET4.0E; .NET4.0C; Tablet PC 2.0; rv:11.0) like Gecko', + 'layout': 'Trident', + 'name': 'IE Mobile', + 'os': 'Windows RT 8.1', + 'product': 'Surface RT', + 'version': '11.0' + }, + 'SRWare Iron 0.2.152.0 on Windows Vista / Server 2008': { 'ua': 'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Iron/0.2.152.0 Safari/41562480.525', 'layout': 'WebKit',