Bitcoin Forum

Other => Beginners & Help => Topic started by: Kazu on April 02, 2013, 06:21:01 PM



Title: Bitcoin:address links?
Post by: Kazu on April 02, 2013, 06:21:01 PM
Is there any way of designing a web wallet such that it can get registered with the browser to open bitcoin: links, through javascript or the like?

Also I have noticed the following problem: When entering something like mailto:me@bitcointalk.org directly into my chrome URL bar, it will open my mail app directly (in my case, windows mail). However, if I enter in bitcoin:139FySgAEA4pxNMsVivdvpXM7SRDrw3qmv directly into my URL bar, this won't happen. It only will open my bitcoin address when I click a <a href="bitcoin:139FySgAEA4pxNMsVivdvpXM7SRDrw3qmv"> link. Note this isn't true for IE.


Title: Re: Bitcoin:address links?
Post by: paradigm on April 02, 2013, 06:27:25 PM
Not to threadjack but on Firefox Linux with Multibit I notice that the bitcoin: links do not work for me and upon clicking I get a message stating it's an invalid protocol. 

It would be nice for it to be done in a way where it "just works".


Title: Re: Bitcoin:address links?
Post by: Kazu on April 02, 2013, 06:36:26 PM
Exactly. One of the biggest barriers to entry in BTC right now is things not "just working."

In any case, I found this:

Quote
navigator.registerProtocolHandler("mailto","https://mail.google.com/mail/?extsrc=mailto&url=%s","Gmail");
Here: http://updates.html5rocks.com/2012/02/Getting-Gmail-to-handle-all-mailto-links-with-registerProtocolHandler

Which could probably be changed to this:
Quote
navigator.registerProtocolHandler("bitcoin", "https://awallet/stuff")
However I have had the following problems when making this an onclick event on a button:
1) It doesn't seem to do anything.
2) I don't know how to pass the variables designated in the link (address, amount, label, etc...)
3) Will this only work in chrome?

Any help?


Title: Re: Bitcoin:address links?
Post by: Kazu on April 02, 2013, 08:42:20 PM
Just noticed, when I try executing that command I get the error:

Error: An attempt was made to break through the security policy of the user agent.

From my browser. Whats going on here?