Not handle external link
This commit is contained in:
parent
1ab772b419
commit
9427952fc7
1 changed files with 12 additions and 1 deletions
|
|
@ -1,8 +1,19 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService) {
|
||||
angular.module('copayApp.services').service('externalLinkService', function($window, $timeout, platformInfo, nodeWebkitService) {
|
||||
|
||||
this.open = function(url, target) {
|
||||
var old = $window.handleOpenURL;
|
||||
|
||||
$window.handleOpenURL = function(url) {
|
||||
// Ignore external URLs
|
||||
$log.debug('Skip: ' + url);
|
||||
};
|
||||
|
||||
$timeout(function() {
|
||||
$window.handleOpenURL = old;
|
||||
}, 500);
|
||||
|
||||
if (platformInfo.isNW) {
|
||||
nodeWebkitService.openExternalLink(url);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue