I'm sure that this is a really well implemented piece of code. However, just as a personal preference (this is not a flame or attack, just some feedback), I think a site using this would be a site I'd stop using. I find the dialog really annoying because the effect of blocking user input in order to display some sort of message seems really inhumane to me. There are better ways to do notifications without pushing a big dialog, with some text, in the face of the user.