Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: prof7bit on May 26, 2013, 10:25:54 PM



Title: QR-Codes for addresses on websites
Post by: prof7bit on May 26, 2013, 10:25:54 PM
This topic does not fit anywhere else, so I am posting it here.

Today I was confronted with the following problem: I was sitting in front of my desktop PC, using my web browsr and came upon an address where I suddenly felt the need to send money to instantly (it was a betting site). My everyday money is on my Android phone, I wanted to make the payment from the Android wallet.

Unfortunately the address on that website did not display any QR-Code and so I had an idea: There must be a greasemonkey script to display QR-codes for any address on any website. I couldn't find anything usable on userscripts.org so I decided to make one myself. Here it is: http://userscripts.org/scripts/show/168629

When its installed and you hover above any BTC address then it will pop up a QR-code for that address. I have tested it on Qupzilla (this is a webkit browser so it might also run on Chrome) and I also tested it on Firefox. Please try it and give me some feedback.


Title: Re: QR-Codes for addresses on websites
Post by: threeip on May 26, 2013, 10:33:59 PM
Nice work. I use https://chart.googleapis.com/chart?chs=300x300&cht=qr&chld=H&choe=UTF-8&chl=1bitcoinaddresshere


Title: Re: QR-Codes for addresses on websites
Post by: Tywill on May 27, 2013, 04:20:31 AM
nifty, I like it


Title: Re: QR-Codes for addresses on websites
Post by: adamas on May 27, 2013, 05:23:42 AM
Nice. Can I use it to create the qr-code of a private key?


Title: Re: QR-Codes for addresses on websites
Post by: gopher on May 27, 2013, 05:36:23 AM
sure, it should work.

publish the result here...

:)


Title: Re: QR-Codes for addresses on websites
Post by: raze on May 27, 2013, 07:17:56 AM
This is really cool, but I doubt I'd use it, it's easier to just send it from the wallet on my desktop.


Title: Re: QR-Codes for addresses on websites
Post by: prof7bit on May 27, 2013, 09:01:03 AM
Nice. Can I use it to create the qr-code of a private key?
Don't do it! This is only meant for publicly known information (bitcoin addresses)! Its using chart.googleapis.com to generate the qr code, some evil google server admin could easyly scan the server log file for everything that looks like a private key and then try to use them. If you need qr-codes for private keys then generate them locally, never send them to some web service!


Title: Re: QR-Codes for addresses on websites
Post by: adamas on May 27, 2013, 09:30:19 AM
Thanks. Do you know a free (and easy) qr-code generator for win?


Title: Re: QR-Codes for addresses on websites
Post by: bitcoinchecker on May 27, 2013, 09:48:35 AM
What's wrong with just pasting the address into blockchain info and using the code that comes up for the address?

Am I missing something?


Title: Re: QR-Codes for addresses on websites
Post by: adamas on May 27, 2013, 10:03:16 AM
What's wrong with just pasting the address into blockchain info and using the code that comes up for the address?

Am I missing something?
QR-codes of private keys should not be generated online.


Title: Re: QR-Codes for addresses on websites
Post by: bitcoinchecker on May 27, 2013, 10:06:27 AM
What's wrong with just pasting the address into blockchain info and using the code that comes up for the address?

Am I missing something?
QR-codes of private keys should not be generated online.

I know that.

But if you want an address QR code to send some coin you can use the one on blockchain info.

The OP idea is still nifty though.
Well done.


Title: Re: QR-Codes for addresses on websites
Post by: cp1 on May 27, 2013, 04:18:34 PM
What's wrong with just pasting the address into blockchain info and using the code that comes up for the address?

Am I missing something?

That works fine, e.g.:  http://blockchain.info/address/1PBH8ywfTHuS6qyxW8oSqaZb5w7spgWHwo


Title: Re: QR-Codes for addresses on websites
Post by: prof7bit on May 27, 2013, 04:51:44 PM
But if you want an address QR code to send some coin you can use the one on blockchain info.

Its just simpler and faster to hover the mouse over the address and have the QR pop up instantly.

My motivation and the final catalyst to implement this was when I wanted to make a few bets on bitbet.us (browsing it with my desktop browser) and my pocket-change money for such purposes being on my android phone. My other money is on a separate Linux laptop but I don't use that very often. They [bitbet] display the address as a clickable bitcoin:1xxxxxx link but they don't display the QR-code. So it would work if I had a wallet installed on that computer but I haven't. Instead what I wanted was to be able to hold my phone against the monitor and scan the address *WITHOUT* doing any additional steps of copy-pasting addresses from one website into another or using qrencode on the command line. Its just convenience. The same sort of convenience that made the invertor of the www invent the clickable hyperlink instead of copying or typing addresses into the address bar.

This greasemonkey script works as follows: After page load it will install a mousemove handler to the body of the document and then when you move the mouse over the website it will permanently try to match the word under the mouse pointer against a regular expression to determine whether that looks like a BTC address. If it looks like an address it will send it to chart.googleapis.com to generate a QR code image and display that. Basically it will do automatcally what you were doing manually.