Skip to content

Instantly share code, notes, and snippets.

@Takazudo
Created January 30, 2014 13:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Takazudo/8708058 to your computer and use it in GitHub Desktop.
Save Takazudo/8708058 to your computer and use it in GitHub Desktop.
var legacyIE = (function() {
var ua = navigator.userAgent;
var matchRes = ua.match(/msie\s?(\d+)/i);
// '.... MSIE 7.0; Windows....'
// => ["MSIE 7", "7"]
if(!matchRes) { return false; }
var version = matchRes[1];
if(!version) { return false; }
version = parseInt(version, 10);
if(version > 8) { return false; }
return true;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment