Browse Source

Started to clean popup opener

master
Igor Zhukov 7 years ago
parent
commit
5c9f4b00b7
  1. 5
      app/js/controllers.js
  2. 12
      app/js/services.js

5
app/js/controllers.js

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

12
app/js/services.js

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

Loading…
Cancel
Save