Skip to content

Instantly share code, notes, and snippets.

View Detect popup blocker in JS
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)
You can’t perform that action at this time.