Created
January 8, 2016 15:21
-
-
Save sawadays0118/74a5f4be90b3363f0199 to your computer and use it in GitHub Desktop.
ユーザーエージェントに依存しない、JavaScriptでのブラウザハックまとめ ref: http://qiita.com/sawadays0118/items/325022cb987412d95a4b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var supportHack = (function() { | |
return { | |
IE9:document.uniqueID && document.documentMode == 9, | |
IE10:document.uniqueID && document.documentMode == 10, | |
IE11:document.uniqueID && document.documentMode == 11, | |
Trident:document.uniqueID, | |
Edge:'-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style && !window.navigator.msPointerEnabled, | |
Gecko:'MozAppearance' in document.documentElement.style, | |
Presto:window.opera, | |
Blink:window.chrome && window.chrome.webstore, | |
Webkit:!window.chrome && 'WebkitAppearance' in document.documentElement.style, | |
Touch:typeof document.ontouchstart != "undefined", | |
Mobile:typeof window.orientation != "undefined", | |
ltAd44:typeof window.orientation != "undefined" && typeof(EventSource) == "undefined", | |
Pointer:window.navigator.pointerEnabled, | |
MSPoniter:window.navigator.msPointerEnabled | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment