13 comments

[ 3.3 ms ] story [ 46.2 ms ] thread
ok, besides the fact that this is the most non-existent use case in the history of QR codes ever, i would love to take a look at the source code if he really managed (and how he managed) to get a QR decoder in 1.5kb. sadly this is not (easily) possible because the script is base64img/canvas encoded, which is (his good right but non the less) very annoying.
It's basically just a jslib that wraps a few divs around an image with a class and then does jsonp requests in order to decode the image - so, I'm sorry to say that but there's no real clientside decoding here
this should be mentioned on the page, otherwise it's misleading, it's a service, not a script, the script is just the interface to the service.
(comment deleted)
It seems all this code does is send the image url to a remote server that does the decoding and returns the content. I'm actually not sure how this takes 1.5kb of code.
Not sure I understand why this was even created in the first place. Wouldn't it suffice to simply spell out the content of the QR next to it, on hover or else? It's not like QR codes are born out of thin air; if you place a QR on your site then it's unlikely you don't know what data it represents.
As others have said, I think the project isn't super useful. The most interesting thing I saw on the page was an attempt at hiding the source for the script by putting it into an image, and then decoding it.

Pretty easy to decode and just console.log though. Here's a Gist of the source for anybody who's interested:

https://gist.github.com/anonymous/5169037

I guess it would have been way more useful if you pointed out how you decoded it. anyways, great post :)
I simply replaced the eval line at the end of the decode script with console.log.

I hadn't seen this obfuscation technique yet, learned something new :)