# src/scripts/CDP/Framework/Platform.js

## Maintainability

63.34

## Lines of code

43

## Difficulty

23.47

## Estimated Errors

0.67

## Function weight

### By Complexity

### By SLOC

/* tslint:disable:max-line-length */ var CDP; (function (CDP) { var Framework; (function (Framework) { /** * @en platform judgement utility * @ja platform 判定オブジェクト * * @seehttps://w3g.jp/blog/tools/js_browser_sniffing */ Framework.Platform = (function () { var ua = navigator.userAgent.toLowerCase(); var majorVersion = function (browser) { var version = ua.match(new RegExp("(" + browser + ")( |/)([0-9]+)")); if (!version || version.length < 4) { return 0; } return parseInt(version[3], 10); }; return { ltIE6: typeof window.addEventListener === "undefined" && typeof document.documentElement.style.maxHeight === "undefined", ltIE7: typeof window.addEventListener === "undefined" && typeof document.querySelectorAll === "undefined", ltIE8: typeof window.addEventListener === "undefined" && typeof document.getElementsByClassName === "undefined", ltIE9: document.uniqueID && typeof window.matchMedia === "undefined", gtIE10: document.uniqueID && window.matchMedia, Trident: document.uniqueID, Gecko: "MozAppearance" in document.documentElement.style, Presto: CDP.global.opera, Blink: CDP.global.chrome, Webkit: typeof CDP.global.chrome === "undefined" && "WebkitAppearance" in document.documentElement.style, Touch: typeof CDP.global.ontouchstart !== "undefined", Mobile: (typeof CDP.global.orientation !== "undefined") || (ua.indexOf("Windows Phone") !== -1), ltAd4_4: typeof CDP.global.orientation !== "undefined" && (typeof CDP.global.EventSource === "undefined" || 30 > majorVersion("chrome")), Pointer: CDP.global.navigator.pointerEnabled, MSPoniter: CDP.global.navigator.msPointerEnabled, Android: (ua.indexOf("android") !== -1), iOS: (ua.indexOf("iphone") !== -1 || ua.indexOf("ipad") !== -1 || ua.indexOf("ipod") !== -1), }; })(); })(Framework = CDP.Framework || (CDP.Framework = {})); })(CDP || (CDP = {})); //# sourceMappingURL=data:application/json;base64,