Skip to content

Instantly share code, notes, and snippets.

@colormono
Created December 17, 2014 23:04
Show Gist options
  • Select an option

  • Save colormono/432103bbb91034900fdb to your computer and use it in GitHub Desktop.

Select an option

Save colormono/432103bbb91034900fdb to your computer and use it in GitHub Desktop.
Adobe Muse Redirect
<script type="text/javascript">
if (screen.width < 574) {
var ref = document.referrer;
var urls = new Array("http://www.mmagoa.com","http://www.mmagoa.com/phone/");
var n = ref.match(urls[0]);
var m = ref.match(urls[1]);
if ((m!==null) || (n!==null)) {
stop;
}
else if (ref=='') {
var r = confirm("Redireccionar el sitio mobile?");
if (r==true) {
window.location = "http://www.mmagoa.com/phone/";
} else {
stop ;
}
} else {
window.location = "http://www.mmagoa.com/phone/";
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment