Skip to content

Instantly share code, notes, and snippets.

@miketaylr
Last active December 28, 2015 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miketaylr/7415705 to your computer and use it in GitHub Desktop.
Save miketaylr/7415705 to your computer and use it in GitHub Desktop.
// 1. Check if this browser supports html5 features
var isHtml5Suppported = false;
var redirectUrl = '/m';
var showIntro=false;
if (window.applicationCache &&
window.openDatabase &&
localStorage )
{
isHtml5Suppported = true;
}
var mobile_html4=true;
var mobile_html5=true;
var cookies=document.cookie.indexOf("ct.html5.capable=true");
if((mobile_html4 ==true) || ((mobile_html5 ==true) && (cookies !=-1))) {
$("mobileTrue").style.display="block";
$("mobileNotSupp").style.display="none";
}
else{
$("mobileNotSupp").style.display="block";
$("mobileTrue").style.display="none";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment