How can I disable window.open() using html, javascript, jQuery...?
I mean block any window open attempt, making "not-working" all existing window.open() functions.
 Which are the best ways to do it? (working also in case of iframes)
//for iframes:
$.each($('iframe'), function() {
    this.contentWindow.open = function (url, windowName, windowFeatures) {
        //iframe window.open caught!
    };
});
//for window:
window.open = function (url, windowName, windowFeatures) {
    //window.open caught!
};
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With