Merge pull request #404 from cmgustavo/bug/open-external-link-02

Not handle external link
This commit is contained in:
Matias Alejo Garcia 2016-10-12 11:50:45 -03:00 committed by GitHub
commit 587249e03b
1 changed files with 12 additions and 1 deletions

View File

@ -1,8 +1,19 @@
'use strict';
angular.module('copayApp.services').service('externalLinkService', function(platformInfo, nodeWebkitService) {
angular.module('copayApp.services').service('externalLinkService', function($window, $timeout, $log, 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 {