Skip to content

Module: Detect Popup Blocker

Jess Williams edited this page Dec 31, 2019 · 2 revisions

Summary

  • Objective: Detect if popup blocker is enabled.
  • Date:
  • Author: wade
  • Browser: All (user notify)
  • Code

Internal Working

Uses the beef.browser.popup.blocker_enbabled function (here):

    blocker_enbabled: function () {
        screenParams = beef.browser.getScreenSize();
        var popUp = window.open('/', 'windowName0', 'width=1, height=1, left='+screenParams.width+',     top='+screenParams.height+', scrollbars, resizable');
        if (popUp == null || typeof(popUp)=='undefined') {
            return true;
        } else {
            popUp.close();
            return false;
        }
    }

Feedback

  • IE6 seems to block popup
  • Firefox 15 seems to allow popup (without extension)
Clone this wiki locally