Hacker News new | ask | show | jobs
by dheera 2107 days ago
Yeah I'd much prefer it be a javascript: URL that did all the magic in the browser. Much safer, cross platform, and it would probably work out of the box in existing QR reader apps.
1 comments

But the snake in a QR code probably works offline
A javascript: URL can work offline. Try this: javascript:document.write("hello world");

Note that if you cut and paste into Chrome it may delete the "javascript:" part and you will have to add that back.

Can a QR code convert to JavaScript like that? i.e. instead of opening a webpage it just executes some JavaScript.