[Greasemonkey] Define showModalDialog with GM
David Kaspar
dkaspars at asite.com
Mon Oct 3 16:05:54 EDT 2005
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?");
}
No matter what I try (window., document., unsafeWindow. or just the
function name) I am not able to define the function.
The same JS error occurs: "window.showModalDialog is not a function".
The function is called from the page like this:
function someFunction() {
...
var confirmUn = window.showModalDialog("http:...",confirmUnread,
WinSettings);
...
}
The function is defined in a nested frame, does this matter?
Thank you,
David Kaspar
FF 1.0.7
GM 0.5.3
More information about the Greasemonkey
mailing list