Created
February 2, 2010 15:14
-
-
Save zenchild/292732 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a convenience method that exists to determine if the window should be closed or not. | |
// There could be a lot more logic here, but for now we are just closing any window whose | |
// location property is equal to "chrome://global/content/commonDialog.xul", which is what the | |
// alert boxes that I have tested use. | |
alertClose: function (subject) { | |
if(subject.location == "chrome://global/content/commonDialog.xul") { | |
window.setTimeout(function() { subject.close(); }, 1000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment