title: Redirect from mobile site to desktop site
body: <p>I have device detection in place using the following code:</p>
  
  <pre><code>&lt;script&gt;
  if( /Android|webOS|iPhone|iPod|BlackBerry|IEMobile/i.test(navigator.userAgent) ) {
  
  if(window.location.hash == "#desktop"){
      // Stay on desktop website
  } else {
      window.location = "&lt;?php bloginfo('url'); ?&gt;/m";
  } 
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>This works in that it gets the user back to the desktop version of the website, however, my problem occurs when a user taps a link on the desktop site and then gets redirected to the mobile site. </p>
  
  <p>How can I always append the <code>#desktop</code> to all links if the View desktop link has been clicked? Is this possible?</p>