prevent popup blocker for external links
This commit is contained in:
parent
bde4f97526
commit
ca50e1dc54
1 changed files with 10 additions and 1 deletions
|
@ -219,7 +219,16 @@ pandora.clickLink = function(e) {
|
||||||
pandora.createLinks = function($element) {
|
pandora.createLinks = function($element) {
|
||||||
$element
|
$element
|
||||||
.on({
|
.on({
|
||||||
click: function() {
|
click: function(e) {
|
||||||
|
if(
|
||||||
|
$(e.target).is('a') && (
|
||||||
|
e.target.hostname != document.location.hostname
|
||||||
|
|| Ox.startsWith(e.target.pathname, '/static')
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
e.preventDefault();
|
||||||
|
window.open('/url=' + encodeURIComponent(e.target.href), '_blank');
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue