copay/js/services/uriHandler.js

15 lines
365 B
JavaScript
Raw Normal View History

2014-06-30 14:41:17 -07:00
'use strict';
var UriHandler = function() {};
UriHandler.prototype.register = function() {
2014-07-01 15:35:15 -07:00
var base = window.location.origin + '/';
var url = base + '#/uri-payment/%s';
2014-07-29 10:13:21 -07:00
if(navigator.registerProtocolHandler) {
navigator.registerProtocolHandler('bitcoin', url, 'Copay');
}
2014-06-30 14:41:17 -07:00
};
angular.module('copayApp.services').value('uriHandler', new UriHandler());