html - How to get QR code to open javascript bookmarklet -


I have a JavaScript bookmark, when you open, runs a script that is a mailbox link that puts a timestamp in the body is. The QR code will open the mailto links completely, but I need to have a timestamp in it, then I use it:

  javascript: location.href = 'mailto: example @ gmail .com? SUBJECT = Data and Body = Time: '+ (New% 20 Dot.) GetTime ())   

This will run on my iPhone or iPad as a bookmark, Instead of opening the URL, click the QR code to open JavaScript inside Safari.

The problem is with the QR code generator, they automatically enter http: // at the beginning of all the URLs that the script closes. I can send it as plain text, but I It can not be found to open in Safari.

Any thoughts on how this can be done?

  • Even a dumb enough QR reader knows that he will not be able to put http: // in front of the link, but will still try to open it in Safari?

  • Use a URL that automatically runs the script, but it will not work without an internet connection, and this means that the user can easily go back to the website

  • Create your own app, but I do not know exactly how to do it

    Thanks in advance .

    I will use a normal URL that points to a web page, where only that simple The script runs. To enable offline capability, just declare an HTML5 web application manifest!

    In this way you only need URL for the first time. Use the QR code. It looks like there is great control over your device, so it should not be a problem. At least one custom QR app!

    Use the hashtag # in the URL for a different QR code and the rest will be in JS. So its always the same web page and it can be loaded offline!

  • Comments

    Popular posts from this blog

    Verilog Error: output or inout port "Q" must be connected to a structural net expression -

    jasper reports - How to center align barcode using jasperreports and barcode4j -

    c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -