mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #404 from cmgustavo/bug/open-external-link-02
Not handle external link
This commit is contained in:
commit
587249e03b
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue