Skip to content

Instantly share code, notes, and snippets.

@wildiney
Created December 18, 2011 17:46
Show Gist options
  • Save wildiney/1494025 to your computer and use it in GitHub Desktop.
Save wildiney/1494025 to your computer and use it in GitHub Desktop.
Detecta Agent User
var useragent = navigator.userAgent;
useragent = useragent.toLowerCase();
if (useragent.indexOf('iphone') != -1 || useragent.indexOf('symbianos') != -1 || useragent.indexOf('ipad') != -1 || useragent.indexOf('ipod') != -1 || useragent.indexOf('android') != -1 || useragent.indexOf('blackberry') != -1 || useragent.indexOf('samsung') != -1 || useragent.indexOf('nokia') != -1 || useragent.indexOf('windows ce') != -1 || useragent.indexOf('sonyericsson') != -1 || useragent.indexOf('webos') != -1 || useragent.indexOf('wap') != -1 || useragent.indexOf('motor') != -1 || useragent.indexOf('symbian') != -1 ) {
document.location = "http://www.fabioandrezo.com.br/portfolio-assinaturas-visuais-mobile.html";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment