by Imagenuity · 14y ago · 0 comments
(function()
{
var proxied = window.alert;
window.alert = function()
{
// replacement code here
// call original function:
proxied.apply(this, arguments);
};
})();Either do it properly or not at all.
If someone really feels like policing it, they can delete the iframe element (in FF, chrome, or opera) and just have access to the editor panes (which means no alerts, redirects, or other nastiness). I'm sure someone can figure out how to write a javascript snippet that will post some text that has been cleaned of all instances of "window.location", "alert", and probably "while". (I would do it myself, but it's 1am here).
If you want to see what arguments are being passed, add a console.dir(arguments); to the code.