There is no window.prototype object. window is a global javascript context object and is not created from a prototype.
However, what you want to do is possible with the following code:
window.old_alert = window.alert; window.alert = function(txt) {
Krizz source share