Created
April 11, 2017 18:16
-
-
Save erotte/d5e2f30cada8b8725f40c0251bfcd358 to your computer and use it in GitHub Desktop.
check for blocked Popups
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 popup = window.open(location.href,'testPopup',"height=1, width=1",true); | |
setTimeout( function() { | |
if(!popup || popup.outerHeight === 0) { | |
//First Checking Condition Works For IE & Firefox | |
//Second Checking Condition Works For Chrome | |
alert("Popup Blocker is enabled! Please add this site to your exception list."); | |
} else { | |
//Popup Blocker Is Disabled | |
popup.close(); | |
} | |
}, 25); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment