diff --git a/lib/www/index.html b/lib/www/index.html index e041c425..b18500bd 100644 --- a/lib/www/index.html +++ b/lib/www/index.html @@ -73,6 +73,15 @@ ws.onmessage = function (evt) { else alert("Message is received:"+ received_msg); }; + +// See http://stackoverflow.com/questions/29186154/chrome-clicking-mailto-links-closes-websocket-connection +$(document).on('click', 'a[href^="bitcoin:"]', function (e) { + e.preventDefault(); + var btcWindow = window.open($(e.currentTarget).attr('href')); + btcWindow.close(); + return false; +}); + @@ -81,7 +90,7 @@ ws.onmessage = function (evt) {

- Pay with Bitcoin + Pay with Bitcoin