5

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.

Community
  • 1
  • 1
Chris Wagner
  • 20,773
  • 8
  • 74
  • 95

2 Answers2

2

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

Lucas B
  • 11,793
  • 5
  • 37
  • 50
0

If it's a page on the same domain, check popup.innerHeight. If it's 0, the popup was most likely blocked.

Eli Grey
  • 35,104
  • 14
  • 75
  • 93