This script broke for current gecko browsers. It users Window.captureEvents() and Window.releaseEvents(). The release function no longer appears to be working. Is there a greasemonkey script that can override this script and release the lock from the child window?
var winModalWindowLevel1
function IgnoreEvents(e)
{
return false;
}
function ShowWindow(URL, name, property)
{
URL = secureURL(URL);
if(window.showModalDialog)
{
window.onclick=IgnoreEvents;
window.onfocus=HandleFocus ;
winModalWindowLevel1 = window.open (URL, name, property);
winModalWindowLevel1.focus();
}
else
{
window.top.captureEvents (Event.CLICK|Event.FOCUS);
window.top.onclick=IgnoreEvents;
window.top.onfocus=HandleFocus ;
winModalWindowLevel1 = window.open (URL, name, property);
winModalWindowLevel1.focus();
}
return winModalWindowLevel1;
}
function HandleFocus()
{
if(window.showModalDialog){
setTimeout("finishChecking()", 10);
}
else{
finishChecking();
}
return true;
}
function finishChecking() {
if (winModalWindowLevel1)
{
if (!winModalWindowLevel1.closed)
{
winModalWindowLevel1.focus();
}
else
{
if(!window.showModalDialog)
{
window.top.releaseEvents (Event.CLICK|Event.FOCUS);
window.top.onclick = "";
}
}
}
}