Let\'s say a web page did this:
window.alert = console.info;
How can I, through browser console, recover the original alert
method
What you can do, is create an iframe attach it to page and then copy alert method from that iframe
//someone did this
window.alert = null;
//you are doing this
var frame = document.createElement('iframe');
document.body.appendChild(frame);
window.alert = frame.contentWindow.alert.bind(window);
document.body.removeChild(frame);