-
-
Save deksoke/34d25d85920195c9cd51 to your computer and use it in GitHub Desktop.
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 isPopupBlocked = function() { | |
var isBlocked, | |
popup = window.open('about:blank', 'popup_test','width=5, height=5, left=0, top=0'); | |
// pop under | |
if(popup) popup.blur(); | |
window.focus(); | |
isBlocked = !popup || typeof popup == 'undefined' || typeof popup.closed=='undefined' || popup.closed || popup.innerHeight == 0; | |
if(popup) popup.close(); | |
return isBlocked; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment