3 ms·
Show HN: my spare time project, an on-site QR image decoder
- franze 14y agook, 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.
- xPaw 14y agoHe just uses JSONP-ajax to get result from "http://www.patrick-wied.at/static/qrgen/qrdecode_widget.php?url http://www.patrick-wied.at/static/qrgen/qrdecode_widget.php?.... It's a dumb idea to sell this for 15$
- dgarner 14y agoIt'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
- franze 14y agothis 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.
- deleted 14y ago[deleted]
- Nyarlah 14y agoIt 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.
- tmslnz 14y agoNot 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.
- bakerfreak 14y agogood point :D
- hiroprot 14y agoAs 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 https://gist.github.com/anonymous/5169037