Skip to content

Instantly share code, notes, and snippets.

@sjungling
Created March 25, 2011 17:53
Show Gist options
  • Save sjungling/887266 to your computer and use it in GitHub Desktop.
Save sjungling/887266 to your computer and use it in GitHub Desktop.
Wherein we redirect people to a mobile site in the absence of a full site flag
if (!window.location.search.match(/fs=1/) && (navigator.userAgent.match(/Android/i) || navigator.userAgent.match(/webOS/i) || navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i))) {
window.location = "http://mobile.csuchico.edu/";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment