Created
May 29, 2019 14:59
-
-
Save esynaps/a209c5d244b117c3e79d80c208a1fd46 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
let win = window.open(path, '_blank') | |
let loading = setTimeout(function () { | |
//Browser has blocked it | |
alert('Please allow popups for this website') | |
}, 5000) | |
try { | |
win.addEventListener('load', function () { | |
clearTimeout(loading) | |
}) | |
} | |
catch (e) { | |
clearTimeout(loading) | |
alert('Please allow popups for this website') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment