Started to clean popup opener

This commit is contained in:
Igor Zhukov 2017-02-10 12:27:44 +03:00
parent 1a93895d4c
commit 5c9f4b00b7
2 changed files with 13 additions and 4 deletions

View File

@ -541,7 +541,10 @@ angular.module('myApp.controllers', ['myApp.i18n'])
url += '/br' url += '/br'
break break
} }
window.open(url, '_blank') var popup = window.open(url, '_blank')
try {
popup.opener = null;
} catch (e) {}
} }
$scope.openContacts = function () { $scope.openContacts = function () {

View File

@ -4524,7 +4524,10 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
url.search('https://t.me/') === 0) { url.search('https://t.me/') === 0) {
target = '_self' target = '_self'
} }
window.open(url, target) var popup = window.open(url, target)
try {
popup.opener = null;
} catch (e) {}
}) })
return true return true
} }
@ -4649,8 +4652,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
return true return true
} }
} }
var wnd = window.open(url, '_blank') var popup = window.open(url, '_blank')
return wnd ? true : false try {
popup.opener = null;
} catch (e) {}
return popup ? true : false
} }
function shareUrl (url, text, shareLink) { function shareUrl (url, text, shareLink) {