1 xq.Browser = { 2 // By Layout Engines 3 isTrident: navigator.appName == "Microsoft Internet Explorer", 4 isWebkit: navigator.userAgent.indexOf('AppleWebKit/') > -1, 5 isGecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, 6 isKHTML: navigator.userAgent.indexOf('KHTML') != -1, 7 isPresto: navigator.appName == "Opera", 8 9 // By Platforms 10 isMac: navigator.userAgent.indexOf("Macintosh") != -1, 11 isUbuntu: navigator.userAgent.indexOf('Ubuntu') != -1, 12 13 // By Browsers 14 isIE: navigator.appName == "Microsoft Internet Explorer", 15 isIE6: navigator.userAgent.indexOf('MSIE 6') != -1, 16 isIE7: navigator.userAgent.indexOf('MSIE 7') != -1 17 };