-
-
Save fragje/2035908 to your computer and use it in GitHub Desktop.
JavaScript: Popup blocker detector tested on Chrome, Firefox, Safari and IE
This file contains hidden or 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 test = window.open(null,"","width=1,height=1"); | |
setTimeout(function(){ | |
if (test && test.innerHeight && test.innerHeight > 0) { | |
// POPUP BLOCKER DISABLED | |
test.close(); | |
} | |
}, 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Man,
I tried your code stuff, I'm unable to dismiss the "turn off your popup blocker!" in my web page(in iPhone) while trying to switch over the new tab. Is there any solution to handle such unhandled alerts behavior scenario.
Above your code stuff, it works fine in Android chrome browser(mobile device).