diff --git a/js/routes.js b/js/routes.js index 7cccf70aa..21e31a442 100644 --- a/js/routes.js +++ b/js/routes.js @@ -104,9 +104,10 @@ angular $idleProvider.warningDuration(40); // in seconds $keepaliveProvider.interval(30); // in seconds }) - .run(function($rootScope, $location, $idle, gettextCatalog) { + .run(function($rootScope, $location, $idle, gettextCatalog, uriHandler) { gettextCatalog.currentLanguage = config.defaultLanguage; $idle.watch(); + uriHandler.register(); $rootScope.$on('$routeChangeStart', function(event, next, current) { if (!localStorage || localStorage.length < 1) { $location.path('unsupported'); diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 34f9937be..6d4106f1d 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -2,7 +2,7 @@ var bitcore = require('bitcore'); angular.module('copayApp.services') - .factory('controllerUtils', function($rootScope, $sce, $location, $filter, notification, $timeout, uriHandler, rateService) { + .factory('controllerUtils', function($rootScope, $sce, $location, $filter, notification, $timeout, rateService) { var root = {}; @@ -182,7 +182,6 @@ angular.module('copayApp.services') root.setupGlobalVariables = function(iden) { notification.enableHtml5Mode(); // for chrome: if support, enable it - uriHandler.register(); $rootScope.unitName = config.unitName; $rootScope.pendingTxCount = 0; $rootScope.initialConnection = true; diff --git a/js/services/uriHandler.js b/js/services/uriHandler.js index b69ed4497..da9dd8695 100644 --- a/js/services/uriHandler.js +++ b/js/services/uriHandler.js @@ -6,8 +6,7 @@ UriHandler.prototype.register = function() { var base = window.location.origin + '/'; var url = base + '#!/uri-payment/%s'; - var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; - if(navigator.registerProtocolHandler && !isFirefox) { + if(navigator.registerProtocolHandler) { navigator.registerProtocolHandler('bitcoin', url, 'Copay'); } };