Team:UT-Tokyo/Templates/BeginContent

From 2011.igem.org

(Difference between revisions)
Line 305: Line 305:
(function(UT_Tokyo) {
(function(UT_Tokyo) {
-
// code stolen from http://neave.com/
 
-
var ua = navigator.userAgent.toLowerCase();
 
-
 
-
UT_Tokyo.isIE6 = /msie [1-6]\./.test(ua);
 
-
UT_Tokyo.isIE7 = /msie 7\./.test(ua);
 
-
UT_Tokyo.isIE8 = /msie 8\./.test(ua);
 
-
if (UT_Tokyo.isIE6 && UT_Tokyo.isIE8) {
 
-
UT_Tokyo.isIE6 = false;
 
-
}
 
-
UT_Tokyo.isIE9 = /msie 9\./.test(ua);
 
-
UT_Tokyo.isIE7or8 = UT_Tokyo.isIE7 || UT_Tokyo.isIE8;
 
-
UT_Tokyo.isChrome = /chrome/.test(ua);
 
-
UT_Tokyo.isFF = /firefox/.test(ua);
 
-
UT_Tokyo.isOpera = /opera/.test(ua) && !(/opera mini/.test(ua));
 
-
UT_Tokyo.isMac = (/mac os/i).test(ua);
 
-
UT_Tokyo.isAndroid = /android/.test(ua);
 
-
UT_Tokyo.isiPad = /iPad/.test(navigator.platform);
 
-
UT_Tokyo.isTouch = !!('ontouchstart' in window);
 
-
UT_Tokyo.hasStorage = !!(window.sessionStorage && sessionStorage.getItem);
 
-
UT_Tokyo.hasHistory = !!(window.history && history.pushState);
 
-
UT_Tokyo.hasCanvas = !!window.CanvasRenderingContext2D;
 
-
UT_Tokyo.hasWebGL = !!window.WebGLRenderingContext;
 
UT_Tokyo.useAjaxLoading = !!(document.location.href.match('Team:UT-Tokyo/?$'));
UT_Tokyo.useAjaxLoading = !!(document.location.href.match('Team:UT-Tokyo/?$'));

Revision as of 18:28, 24 August 2011