zeniko wrote:Morac wrote:3. The option to reload all windows doesn't work at the moment.
Just replacing <code>CRTabRestored</code> with <code>SSTabRestored</code> in the original code should do the trick (the underlying code is exactly the same).
I think I was thinking along that lines originally but removed it to focus on other stuff and kind of forgot about it. It looks like it should work so I'll try that.
zeniko wrote:Morac wrote:4. Sometimes the extension's undo closed tab list will get temporary out of sync with the browser's closed tab list
I'd recommend not trying to keep a second list of closed tabs around but to always directly use the one provided by Firefox instead. Should save you some code and bugs...
I don't really keep a second list around, I keep a list of the tab titles around and sync it to Firefox's closed tabs list. The main reason I did this is I kept getting exceptions telling me windows didn't exist otherwise. I'll see if I can work around that somehow.
Right now I'm running into two problems:
1. There is no way to trap the closing of a window to save their state because SessionStore dumps its data before the onunload event fires. This means by the time the extension is called, calling SessionStore results in an exception. This has been documented in Firefox Bug 360408
2. The data returned from a SessionStore's getWindowState(window) function borks when put into the eval function since it isn't formatted correctly for that (it is missing the "[ { ... } ]" around the data. It is easy to work around, but this seems more like a bug in firefox to me. I reported it as such at Bug 365265.