A Few Javascript QR Bookmarklets

For those who enjoy playing around with QR codes, here’s a little javascript bookmarklet I cobbled together from various FAQs.

What this does, as you will (hopefully) see if you try it, is open a prompt, allow you to enter text, and then convert that text to a QR code using the Google Chart API.

javascript:void(Qr=prompt('What do you want the code to say?','this code says nothing',location.href));if(Qr)location.href='http://chart.apis.google.com/chart?cht=qr&chof=gif&chtt=QR Code&chs=350x500&chl='+Qr;

Easy enough. While we’re at it, here are a few more QR-related javascript applets I’ve used in the past.

This one simply converts the current URL to a QR code:

javascript: location.href='http://chart.apis.google.com/chart?cht=qr&chof=gif&chtt=QR Code&chs=350x500&chl='+escape(location.href);

And this one prints the current screen. Which would be helpful if your current screen shows a newly-minted QR code.

javascript:window.print()

The goal of all of this (for me) is to try and develop a way to reduce the printing of a QR code to a “one-click” sort of procedure. I’ve been working with a heat-activation Polaroid Zink printer, but not having a lot of success. For one thing, the Zink printer is kind of a pain. It only accepts jpgs in a particular portrait size (you might note the constraining 350 x 500 pixel variables in my code above), and the Google API only generates gif and png (adjust the “chof=” variable in the code to get a png, if you like). And while the Bluetooth on the printer works pretty well, iPhones still can’t send pictures over Bluetooth, so that means I have to drag a computer around with the Zink printer. At least until I can get a non-iPhone, but with my current budget, that will probably not be for a while.

But, one step at a time. If you find a better mobile printer, or use any other fun QR tools or tricks, let me know.

Posted: September 28th, 2011
Categories: Emissions
Tags: , ,
Comments: No Comments.