Merge pull request #1179 from alizahid/patch-1

Update lib/ace/lib/useragent.js
This commit is contained in:
Harutyun Amirjanyan 2012-12-31 23:53:56 -08:00
commit 9c61ac1127

View file

@ -73,8 +73,9 @@ exports.isMac = (os == "mac");
// Is the user using a browser that identifies itself as Linux
exports.isLinux = (os == "linux");
// Windows Store JavaScript apps (aka Metro apps written in HTML5 and JavaScript) do not use the "Microsoft Internet Explorer" string in their user agent, but "MSAppHost" instead.
exports.isIE =
navigator.appName == "Microsoft Internet Explorer"
(navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
&& parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
exports.isOldIE = exports.isIE && exports.isIE < 9;