Session Manager 0.1 to 0.3.9+
March 25th, 2006, 5:20 pm
I think maybe 'Replace Existing Windows' should be off by default because it Does Bad Things. But, it is in the Session Manager menu, so maybe anyone who doesn't notice it deserves it.
March 25th, 2006, 5:25 pm
really? it's been working fine for the most part here.
Firefox and Extension Developer - App Tabs 0.6.2, Tab Progress Bar 0.6, Tabberwocky 1.1, and Add-ons Sidebar 3.8
March 25th, 2006, 5:33 pm
Yeah. I'm turning it off because of that.
If you were talking to me, I just mean Does Bad Things as exactly what it does: Overwrites the tabs you had open.
March 25th, 2006, 7:15 pm
haha. and yeah, saving POSTDATA is unreliable. actually, i mean, too reliable Firefox and Extension Developer - App Tabs 0.6.2, Tab Progress Bar 0.6, Tabberwocky 1.1, and Add-ons Sidebar 3.8
March 25th, 2006, 11:29 pm
hehe... I was only pointing out to Peng & alta that it could easily be done
incidentally the code i use is here if anyone cares to use it and doesn't want to install any other extensions ~ line 76 this.setPref("_running", true); this.mFullyLoaded = true; getBrowser().mTabContainer.addEventListener("click",function(e){ if (e.button !=1 || !gSessionManager.mClosedTabs.length) return; if(e.originalTarget.className == "tabs-right") gSessionManager.undoCloseTab(); },false)
March 26th, 2006, 4:44 pm
You want to overwrite and to rename at the same time. One way to achieve something like this is to add the following line to your userChrome.js. You can then select a session and name it before overwriting it (right-click to select without overwriting the name):
BTW: It is recommended to update to version 0.3.7.6 for the best effect.
I hadn't even thought of that. I've thus removed the hack again. For those interested in the code, <a href="data:text/plain,288%2C289c288%2C291%0A%3C%20%09%09%09menuitem.setAttribute(%22oncommand%22%2C%20'gSessionManager.load(%22'%20%2B%20aSession.fileName%20%2B%20'%22%2C%20(event.shiftKey)%3F%22newwindow%22%3A(event.ctrlKey)%3F%22append%22%3A%22%22)%3B')%3B%0A%3C%20%09%09%09menuitem.setAttribute(%22onclick%22%2C%20'if%20(event.button%20%3D%3D%201)%20gSessionManager.load(%22'%20%2B%20aSession.fileName%20%2B%20'%22%2C%20%22newwindow%22)%3B')%3B%0A---%0A%3E%20%09%09%09menuitem.setAttribute(%22oncommand%22%2C%20%22gSessionManager.onSessionCommand(event%2C%20this)%3B%22)%3B%0A%3E%20%09%09%09menuitem.setAttribute(%22onclick%22%2C%20%22gSessionManager.onSessionClick(event%2C%20this)%22)%3B%0A%3E%20%09%09%09menuitem.setAttribute(%22_session%22%2C%20aSession.fileName)%3B%0A%3E%20%09%09%09menuitem.setAttribute(%22_name%22%2C%20aSession.name)%3B%0A292a295%0A%3E%20%09%09delete%20this.mMarkedSession%3B%0A326a330%2C358%0A%3E%20%09onSessionCommand%3A%20function(aEvent%2C%20aItem)%0A%3E%20%09%7B%0A%3E%20%09%09if%20(!this.mMarkedSession)%0A%3E%20%09%09%7B%0A%3E%20%09%09%09this.load(aItem.getAttribute(%22_session%22)%2C%20(aEvent.shiftKey)%3F%22newwindow%22%3A(aEvent.ctrlKey)%3F%22append%22%3A%22%22)%3B%0A%3E%20%09%09%7D%0A%3E%20%09%09else%20if%20(this.mMarkedSession%20%3D%3D%20aItem.getAttribute(%22_session%22))%0A%3E%20%09%09%7B%0A%3E%20%09%09%09this.save(aItem.getAttribute(%22_name%22)%2C%20this.mMarkedSession%2C%20aEvent.shiftKey)%3B%0A%3E%20%09%09%7D%0A%3E%20%09%7D%2C%0A%3E%20%0A%3E%20%09onSessionClick%3A%20function(aEvent%2C%20aItem)%0A%3E%20%09%7B%0A%3E%20%09%09if%20(aEvent.button%20%3D%3D%201%20%26%26%20!this.mMarkedSession)%0A%3E%20%09%09%7B%0A%3E%20%09%09%09this.load(aItem.getAttribute(%22_session%22)%2C%20%22newwindow%22)%3B%0A%3E%20%09%09%7D%0A%3E%20%09%09else%20if%20(aEvent.button%20%3D%3D%202)%0A%3E%20%09%09%7B%0A%3E%20%09%09%09if%20(this.mMarkedSession)%0A%3E%20%09%09%09%7B%0A%3E%20%09%09%09%09aItem.parentNode.getElementsByAttribute(%22_session%22%2C%20this.mMarkedSession)%5B0%5D.removeAttribute(%22marked%22)%3B%0A%3E%20%09%09%09%7D%0A%3E%20%09%09%09this.mMarkedSession%20%3D%20aItem.getAttribute(%22_session%22)%3B%0A%3E%20%09%09%09aItem.setAttribute(%22marked%22%2C%20%22true%22)%3B%0A%3E%20%09%09%7D%0A%3E%20%09%7D%2C%0A%3E%20%0A">there you are</a>.
That happens when you haven't been redirected at the moment of closing the browser. Currently there's not much I could do against that. You could simply disable POSTDATA saving.
I switched this on because (1) the use cases I saw primarily involved replacing rather than appending (and users might get confused by the many open windows), (2) the setting of this option is clearly visible when you click on a session and (3) if you get bitten by this, you can always reopen all (i.e. per default a maximum of 10) windows closed in the process.
Or add the following code to your userChrome.js (if you're already using it, anyway):
Or if you prefer a double-click instead of a middle-click:
March 26th, 2006, 5:21 pm
Form data is still saved, right? I still support a warning page when POSTDATA will be submitted again because of Crash Recovery/Session Manager. I think.
Oh, that's true, you can reopen them. No complaint from me, then.
March 26th, 2006, 6:17 pm
Sure. Form data and POSTDATA are two different things (although the former usually becomes the latter
So do I. But this is currently impossible to achieve from JS, AFAICT.
March 26th, 2006, 6:41 pm
Just makin' sure. Maybe there should be preferences for saving form data, and maybe cookies?
Firefox does it when you try to refresh a page that has POSTDATA.. Oh, I thought of another thing: Since you can specify the default name for saved sessions, I would like to be able to specify the name of the session backups that are automatically made after Firefox crashes. Edit: You know, there's no reason to use + in the Firefox maxVersion anymore. 1.6a1 or 1.6 work. But, do older versions of Firefox get confused by that when they try to parse the file?
March 26th, 2006, 7:14 pm
Like this extension,don't know if you are still doing changes but if you are, please consider: As a long time user of TabBrowserExtensions (TBE) there are some odds and ends that might improve this ext.:
1. Ability to right click or otherwise directly perform an operation on a saved session or tab rather than having to open the separate window.) 2. Numbers for retained items, enterable from keybd. to load selection. 3. A flush/delete all option. And do you have any suggestions for an "easy" way to import sessions from TBE?
March 26th, 2006, 8:41 pm
zeniko's last post was an hour before yours and the last version was released today. Why wouldn't he (you are a he, right, zeniko?) still be doing changes?
There was a discussion on having a context menu for the Session Manager menus a page or two ago. It's not going to happen.
In the window where you delete sessions, you can select all of them with Shift or Ctrl.
I don't, sorry. I haven't used TBE in a long time. The easiest way to do it would be to open each of the sessions with TBE and save them with Session Manager, I guess. Edit: I have an ishoooo. When I upgraded from SM 0.3.7.3 to 0.3.7.6 just now, including uninstalling it, restarting, installing it, restarting one or two more times, and finally restarting and going back to my normal use, it both used old data for the session I saved before upgrading (not close to my current session, it might've been a copy of my last saved session, actually) and it randomly opened that session the first time I restarted, instead of what I had open when I closed Firefox. WTF?
March 26th, 2006, 10:05 pm
Is it possible to make this work for double-click? To do the "right-click to select without overwriting the name" with one less click, at least for me 'cause I use the middle-button-single-click-as-double-click, and less drag I'd prefer but if it's not, that's fine. Thanks!
March 27th, 2006, 5:19 am
Isn't there? You can already say where to save form data, cookies and POSTDATA and you can disable POSTDATA saving - which would result in precisely the pref you're advocating.
Sure it does, but Firefox isn't pure JS. Now, if somebody could point me into the right direction for doing this (or even provide the necessary code)...
What's wrong with the default name? I'd really prefer not to have to offer you prefs for simple UI strings.
I prefer keeping the + just for saying that developing versions are included (BTW: 1.6a1 is still an invalid version - see this article).
The issue with this request is that it's neither easily discoverable (you have to know that it's there) and that it's not keyboard accessible. I'm open for suggestions, but I won't do it the TBE or TMP way. As for right-clicking on single tabs - what operation would you expect there? Anyway, I prefer not to clutter all possible menus with my entries but just offer a minimal UI impact which you could easily extend (e.g. through MenuManipulator).
I don't understand this request. Please reformulate or explain it further.
You can delete multiple sessions at once from the dialog and you can clear the "Reopen Closed..." list from the Options dialog. Do you mean anything different here?
Installing both extensions side-by-side and then loading each session from TBE and saving it with SM might work... Otherwise you'll have to ask a kind soul to write a convertor (or do so yourself).
Please try to reproduce this behavior - if possible on a clean profile - so that I can see the problem for myself. Your description here is unfortunately not really helpful. Obviously I've never encountered such an issue myself (and don't see any code path which could lead to such - but I may be mistaken) and what you describe could just as well be due to an incorrect manipulation on your side (which I'd still be interested in knowing).
This should now work as expected as of version 0.3.7.7.
March 27th, 2006, 11:17 am
It doesn't matter to me, I'm okay with cookies and form data being saved. But some people might only want one of them.
True. Since no matter how much I want to provide the code to do it, I don't know how, never mind, I guess. *Sigh* (at me, not you)
You already have the pref for the default name for when you save sessions. I prefer using YYYY-MM-DD HH:MM (crashed) or something like that, that way the crashed sessions aren't separate from the main list of sessions.
I didn't do anything wrong. I clicked the Session Manager button, clicked 'Save Session' because it automatically has the new name, used TMP's context menu item to close all the tabs except one, and restarted Firefox. I have SM configured to load the '[ Previous Browsing Session ]' session at startup and to back up the current session at shutdown. We'll see if this happens again when I upgrade to 0.3.7.7. Edit: I just upgraded to 0.3.7.7. Hah. I saved my session with both Tab Mix Plus's Session Manager and your Session Manager. On the next startup, TMP popped up a dialog saying that its session.rdf was corrupt so it was moving it to session.old and using an empty session.rdf. I am not having luck with the session extensions.
March 27th, 2006, 8:38 pm
For all those who really want this, I've prepared some lines to be added to your userChrome.js - get them at the Download section in the first post (just note that that code isn't as well tested and might not be as well supported). Return to Extension Development Who is onlineUsers browsing this forum: No registered users and 2 guests |
|