Did your script open a window? Firefox 2 and later do not allow scripts to close windows that they did not open.
You can try this trick , but I have no idea if it will work. I live on the side of the population, who believes that users should control their browser windows, not the application (despite the fact that you have a good reason for this).
source
share