Every once in a while I need to restart Firefox (e.g. to update an extension, or to remove Firefox memory consumption), or I need to restart my machine and close Firefox. Since I always have a meebo tab open, when I close Firefox I get this annoying message from meebo (which uses the onbeforeunload event):
If you leave, your meebo IM sessions will not be preserved!
Today I realized that this message is almost never useful – I never closes the meebo tab by mistake – I only do it when I want to close (or restart) the browser, and then I realized a quick user script can solve the problem. I checked into Meebo code, and so that the string is a member of the meebolang object that holds language-dependent strings. This string (meebolang.navigateAway) is returned in the onbeforeunload event, so to hide it, I can simply change that member.
A few trials taught me that in Firefox, the onbeforeunload event must return undefined (and not null or false) for the warning unload message to disappear. Once that was achieved, implementing the required user script was easy.
July 1, 2008 at 3:30 pm |
Any chance you could update this so it works with the current meebo code and FF3.0? Feel free to mail me a response.
July 1, 2008 at 8:48 pm |
@Melvyn: That’s strange. As I said, I no longer use Meebo, but Miranda IM. However, I tried it with FF 3.0 with Meebo current code, and it seems to work OK.
Can you give more details, or try to debug the script?