Template:Team:KIT-Kyoto/browser
From 2014.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
<html> | <html> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | + | jQuery(function($){ | |
- | var | + | var kit_ua = (function(){ |
- | + | 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:window.opera, | |
- | + | Blink:window.chrome, | |
- | + | Webkit:typeof window.chrome == "undefined" && 'WebkitAppearance' in document.documentElement.style, | |
- | + | Touch:typeof document.ontouchstart != "undefined", | |
- | + | Mobile:typeof window.orientation != "undefined", | |
- | + | ltAd4_4:typeof window.orientation != "undefined" && typeof(EventSource) == "undefined", | |
- | + | Pointer:window.navigator.pointerEnabled, | |
- | + | MSPoniter:window.navigator.msPointerEnabled | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | } | + | })(); |
- | + | if(kit_ua.ltIE6 || _ua.ltIE7 || _ua.ltIE8 || (_ua.Trident && !_ua.ltIE8) || (_ua.Trident && !_ua.ltIE9 ) || _ua.gtIE10 || (_ua.Blink && !_ua.Mobile) || (_ua.Blink && _ua.Mobile) || _ua.ltAd4_4 || (_ua.Webkit && !_ua.Mobile) || (_ua.Webkit && _ua.Mobile) || _ua.ltAd4_4 || (_ua.Gecko && !_ua.Mobile) || (_ua.Gecko && _ua.Mobile) || (_ua.Presto){ | |
- | + | document.getElementByClass('kit_browser').innerHTML = 'We recommend FireFox'; | |
- | + | }else if(_ua.Gecko && !_ua.Mobile){ | |
- | + | document.getElementByClass('kit_browser').innerHTML = 'Your browser is FireFox'; | |
- | + | } | |
- | }else if( | + | }); |
- | + | ||
- | } | + | |
</script> | </script> |
Revision as of 05:36, 11 September 2014