News for hackers. Stuff that matters.
Re:Show HN: my spare time project, an on-site QR image decoder by tmslnz on Friday March 15, 2013 @06:10AM (#5379851)
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.
Re:Show HN: my spare time project, an on-site QR image decoder by bakerfreak on Friday March 15, 2013 @06:11AM (#5379853)
good point :D
Re:Show HN: my spare time project, an on-site QR image decoder by hiroprot on Friday March 15, 2013 @07:04AM (#5379953)
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

Re:Show HN: my spare time project, an on-site QR image decoder by dgarner on Friday March 15, 2013 @07:52AM (#5380069)
I guess it would have been way more useful if you pointed out how you decoded it. anyways, great post :)
Re:Show HN: my spare time project, an on-site QR image decoder by hiroprot on Friday March 15, 2013 @08:03AM (#5380094)
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 :)

Re:Show HN: my spare time project, an on-site QR image decoder by franze on Friday March 15, 2013 @05:52AM (#5379819)
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.
Re:Show HN: my spare time project, an on-site QR image decoder by xPaw on Friday March 15, 2013 @05:56AM (#5379831)
He just uses JSONP-ajax to get result from "http://www.patrick-wied.at/static/qrgen/qrdecode_widget.php?.... It's a dumb idea to sell this for 15$
Re:Show HN: my spare time project, an on-site QR image decoder by franze on Friday March 15, 2013 @06:02AM (#5379842)
we can start calling this the SimCity strategy:

  1. pitch a software product (script/game)
  2. sell a service
  3. be misleading about it
Re:Show HN: my spare time project, an on-site QR image decoder by dutchbrit on Friday March 15, 2013 @06:02AM (#5379843)
+1
Re:Show HN: my spare time project, an on-site QR image decoder by dgarner on Friday March 15, 2013 @05:59AM (#5379838)
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
Re:Show HN: my spare time project, an on-site QR image decoder by franze on Friday March 15, 2013 @06:04AM (#5379846)
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.
Re:Show HN: my spare time project, an on-site QR image decoder by Nyarlah on Friday March 15, 2013 @05:57AM (#5379835)
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.