[Greasemonkey] Define showModalDialog with GM

Jeremy Dunck jdunck at gmail.com
Mon Oct 3 11:55:50 EDT 2005


On 10/3/05, David Kaspar <dkaspars at asite.com> wrote:
> This is my first attempt at improving the usability of an IE-only site.
>
> I would like to replace a showModalDialog function call (which does not
> work in FireFox) with a simple call to confirm. Like so:
>
> window.showModalDialog = function(a,b,c) {
>     return window.confirm("Are you sure?");
> }

Try this:
unsafeWindow.showModalDialog = function(a,b,c) {
     return window.confirm("Are you sure?");
}


More information about the Greasemonkey mailing list