basic URI handling
This commit is contained in:
parent
108824e294
commit
a7d484c944
4 changed files with 14 additions and 2 deletions
|
|
@ -926,6 +926,7 @@ on supported browsers please check <a href="http://www.webrtc.org/">http://www.w
|
|||
<script src="js/services/notifications.js"></script>
|
||||
<script src="js/services/backupService.js"></script>
|
||||
<script src="js/services/isMobile.js"></script>
|
||||
<script src="js/services/uriHandler.js"></script>
|
||||
|
||||
<script src="js/controllers/header.js"></script>
|
||||
<script src="js/controllers/footer.js"></script>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ angular
|
|||
})
|
||||
.run(function($rootScope, $location) {
|
||||
$rootScope.$on('$routeChangeStart', function(event, next, current) {
|
||||
|
||||
if (!util.supports.data) {
|
||||
$location.path('unsupported');
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
var bitcore = require('bitcore');
|
||||
|
||||
angular.module('copayApp.services')
|
||||
.factory('controllerUtils', function($rootScope, $sce, $location, notification, $timeout, Socket, video) {
|
||||
.factory('controllerUtils', function($rootScope, $sce, $location, notification, $timeout, Socket, video, uriHandler) {
|
||||
var root = {};
|
||||
|
||||
root.getVideoMutedStatus = function(copayer) {
|
||||
|
|
@ -64,6 +64,7 @@ angular.module('copayApp.services')
|
|||
};
|
||||
|
||||
root.setupRootVariables = function() {
|
||||
uriHandler.register();
|
||||
$rootScope.unitName = config.unitName;
|
||||
$rootScope.txAlertCount = 0;
|
||||
$rootScope.insightError = 0;
|
||||
|
|
|
|||
11
js/services/uriHandler.js
Normal file
11
js/services/uriHandler.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
var UriHandler = function() {};
|
||||
|
||||
UriHandler.prototype.register = function() {
|
||||
navigator.registerProtocolHandler('bitcoin',
|
||||
'uri=%s',
|
||||
'Copay');
|
||||
};
|
||||
|
||||
angular.module('copayApp.services').value('uriHandler', new UriHandler());
|
||||
Loading…
Add table
Add a link
Reference in a new issue