标签:chrome javascrip mod 获取 firefox ide navigator asc regex
browser: { chrome: /chrome\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp["\x241"] : undefined, firefox: /firefox\/(\d+\.\d+)/i.test(navigator.userAgent) ? +RegExp["\x241"] : undefined, ie: /msie (\d+\.\d+)|Trident/i.test(navigator.userAgent) ? (document.documentMode || +RegExp["\x241"]) : undefined, isGecko: /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent), isWebkit: /webkit/i.test(navigator.userAgent), opera: /opera(\/| )(\d+(\.\d+)?)(.+?(version\/(\d+(\.\d+)?)))?/i.test(navigator.userAgent) ? +(RegExp["\x246"] || RegExp["\x242"]) : undefined, safari: /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(navigator.userAgent) && !/chrome/i.test(navigator.userAgent) ? +(RegExp["\x241"] || RegExp["\x242"]) : undefined, isSogouIE: ((navigator.userAgent.toLowerCase()).indexOf("msie") > 0) && ((navigator.userAgent.toLowerCase()).indexOf("se") > 0) && ((navigator.userAgent.toLowerCase()).indexOf("360se") == -1), isBaidu: /BIDUBrowser/i.test(navigator.userAgent), edge: /edge\/(\d+)/i.test(navigator.userAgent) ? +RegExp["\x241"] : undefined }
标签:chrome javascrip mod 获取 firefox ide navigator asc regex
原文地址:https://www.cnblogs.com/caoruichun/p/9465550.html