title: mobile site redirect with full site link
body: <p>I'm using the javascript version from <a href="http://detectmobilebrowsers.com/" rel="nofollow">http://detectmobilebrowsers.com/</a> to redirect to a mobile site.  The only thing is that I have a link to go to the full site in the off chance that users want/need to go there.</p>
  
  <p>However, when you click on the link to view the full site from the mobile, it picks back up on the redirection and kicks it back to the mobile version and not to the full site.</p>
  
  <p>I was doing some searching and was wondering if it could be possible to hack it so that it uses</p>
  
  <pre><code>window.location.href.indexOf
  </code></pre>
  
  <p>or somthing of that nature like this:</p>
  
  <pre><code>if(window.location.href.indexOf("mobile/index.html") &gt; -1)
  {window.location = "http://thefullsiteURL.com"}
  else { function (a, b) {
  if (//mobile direction stuff from detectmobilebrowsers.com
  })(navigator.userAgent || navigator.vendor || window.opera,
  'http://thefullsiteURL.com/mobile/index.html')};
  </code></pre>
  
  <p>Keep in mid that this is something that I pieced together and my JS skills are fairly new, so if any one has a more elegant solution I am all for it.</p>