title: How to get a QR code to open a JavaScript bookmarklet
body: <p>I have a JavaScript bookmarklet that when you open it, runs a script that is a <code>mailto</code> which puts a timestamp in the body. QR codes will open up my <code>mailto</code> links perfectly, but I need this to have a timestamp in it, so I use this:</p>
  
  <pre><code>javascript:location.href='mailto:example@gmail.com?SUBJECT=Data&amp;BODY=Time:'+(new%20Date().getTime())
  </code></pre>
  
  <p>It runs on my iPhone or iPad as a bookmark, but I want to make a QR code to open the JavaScript inside Safari instead of opening a URL.</p>
  
  <p>The problem is with QR code generators, they all automatically put <code>http://</code> at the beginning of URLs, which throws the script off. I can send it as plain text, but I can’t get that to open in Safari.</p>
  
  <p>Any ideas on how this could be done? I had a couple thoughts:</p>
  
  <ul>
  <li><p>anyone know of a smart enough QR reader app that would be able to run the script on its own?</p></li>
  <li><p>anyone know of a dumb enough QR reader that it won’t put <code>http://</code> in front of the link, but will still try to open it in Safari?</p></li>
  <li><p>use a URL that automatically runs the script, but this won’t work without an internet connection, and it means users can just easily go back to the website</p></li>
  <li><p>build my own app, but I have absolutely no idea how to do that</p></li>
  </ul>
  
  <p>Thanks in advance.</p>