Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect blocked pop-up in Chrome

Ok so I am using Chromium for Ubuntu 9.10 and cannot get this working using the normal means of detecting a pop-up blocker which are...

var popup = window.open(...);
var blocked;
if(!popup) {
    blocked = true;
} else {
    blocked = false;
}

Also, the accepted solution in this SO post, Detect blocked popup in Chrome, does not work.

like image 700
Chris Wagner Avatar asked Nov 05 '22 14:11

Chris Wagner


1 Answers

popup.innerHeight no longer works. Use outerHeight, if greater than zero then it was not blocked.

like image 178
Lucas B Avatar answered Nov 12 '22 12:11

Lucas B