Last active
December 19, 2015 18:09
-
-
Save yxkelan/5996877 to your computer and use it in GitHub Desktop.
#JavaScript The safari has a pop-up blocker silencer not show when a link is blocked.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var link = $('<a></a>'); | |
link.attr('target','_blank'); //Open a new tab | |
function newopen(newlink){ | |
if(newlink){ | |
var win = window.open(newlink, '_blank'); | |
if (win == null || typeof(win) == undefined){ | |
link.attr('href',newlink); | |
link[0].click(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment