MozillaZine

Request: "Close Other Tabs" only extension

Talk about add-ons and extension development.
fbddk

User avatar
 
Posts: 65
Joined: February 28th, 2003, 2:47 pm
Location: Dinamarca

Post Posted March 4th, 2003, 4:22 am

Since the "Close Other Tabs" disapeared from the context menu on tabs in the nightly builds it has been greatly missed.

I can only speak for myself, but reading the <a href='http://www.mozillazine.org/forums/viewtopic.php?t=6201'>Close Other Tabs</a> thread in the Phoenix Build Forum, I'd say I'm not the only one who misses the option. But reading the same thread also tells that some people are glad it's gone since they consider it a securety risc.

Well I like the feature and would be greatfull if genius you would create a simple extension that does nothing but putting the "Close Other Tabs" back on the context menu on tabs.

Bring choice to the people :-)

Vanitas
 
Posts: 13
Joined: February 26th, 2003, 5:21 am

Post Posted March 4th, 2003, 4:35 am

fbddk wrote:Well I like the feature and would be greatfull if genius you would create a simple extension that does nothing but putting the "Close Other Tabs" back on the context menu on tabs.

Bring choice to the people :-)


Try "Tabbrowser Extensions". It has such option.

V.

fbddk

User avatar
 
Posts: 65
Joined: February 28th, 2003, 2:47 pm
Location: Dinamarca

Post Posted March 4th, 2003, 5:34 am

Have tried the TBE - never had the luck to see it actually work though. Suspect it for being the source of some browser breakdowns. Besides the settings for TBE is way to complex and confusing.

I like small extensions that keeps it simple. Package deals like TBE brings some choice to the user - many small extensions brings great choice to the user.

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted March 4th, 2003, 9:12 am

<a href="http://texturizer.net/phoenix/extensions.html#Tabbrowser%20Preferences">Tabbrowser Preferences</a> by Chris Cook can be thought of as a <a href="http://texturizer.net/phoenix/extensions.html#Tabbed%20Browsing%20Extensions">TBE</a>-Lite. I don't know if he put that functionality into it, though.
Former UMO Admin, Former MozillaZine General Mod
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files

Chris Cook

User avatar
 
Posts: 898
Joined: December 14th, 2002, 9:57 am
Location: Québec, Canada

Post Posted March 4th, 2003, 2:53 pm

alanjstr wrote:<a href="http://texturizer.net/phoenix/extensions.html#Tabbrowser%20Preferences">Tabbrowser Preferences</a> by Chris Cook can be thought of as a <a href="http://texturizer.net/phoenix/extensions.html#Tabbed%20Browsing%20Extensions">TBE</a>-Lite. I don't know if he put that functionality into it, though.

It is not currently a feature. If this is a sufficiently desired feature (which I think it was last time I asked) I could look into it.

alanjstr
Moderator

User avatar
 
Posts: 9100
Joined: November 5th, 2002, 4:43 pm
Location: Anywhere but here

Post Posted March 4th, 2003, 4:58 pm

Chris Cook wrote:
alanjstr wrote:<a href="http://texturizer.net/phoenix/extensions.html#Tabbrowser%20Preferences">Tabbrowser Preferences</a> by Chris Cook can be thought of as a <a href="http://texturizer.net/phoenix/extensions.html#Tabbed%20Browsing%20Extensions">TBE</a>-Lite. I don't know if he put that functionality into it, though.

It is not currently a feature. If this is a sufficiently desired feature (which I think it was last time I asked) I could look into it.


Several people in here would give there first-born for it. Well, maybe third-born. But they really really want it. It should be easy enough to find the code they ripped out.
Former UMO Admin, Former MozillaZine General Mod
I am rarely on mozillaZine, so please do not send me a private message.
My Old Firefox config files

cdn

User avatar
 
Posts: 999
Joined: November 4th, 2002, 5:47 pm
Location: UK

Post Posted March 4th, 2003, 5:32 pm

it is [was] in XBL, which makes adding by extension that bit more fun ...

Chris Cook

User avatar
 
Posts: 898
Joined: December 14th, 2002, 9:57 am
Location: Québec, Canada

Post Posted March 4th, 2003, 9:10 pm

cdn wrote:it is [was] in XBL, which makes adding by extension that bit more fun ...

You are correct. It looks like I'll need to learn some new tricks to pull off that feature. On hold until further notice.

Stefan

User avatar
 
Posts: 2051
Joined: November 5th, 2002, 2:46 am

Post Posted March 5th, 2003, 10:46 am

Chris, if you are looking into adding this, is there any chance you could copy the "undo close tab" function from TBE too in cunjunction with this?

Thse 2 features would really make sence together (removing the potential loss of data problem with having a close all other tabs function).

I know your ambition is to keep your extension "light", but a undo close tab I'm sure would be appreciated by all "tabbers" out there. :)

mboullet
 
Posts: 337
Joined: November 5th, 2002, 2:34 am
Location: France

Post Posted March 13th, 2003, 5:52 am

Chris Cook wrote:You are correct. It looks like I'll need to learn some new tricks to pull off that feature. On hold until further notice.


Chris,
The code is quite obvious. I just added it to my soon to be released All-in-One 0.3.
Here it is:

contentArea = document.getElementById("content");
tabCount = contentArea.mPanelContainer.childNodes.length;
if (tabCount > 1) {
var activeTab = contentArea.mTabContainer.selectedIndex;
for (var i = tabCount-1; i >= 0; --i) // reverse order is important
if (i != activeTab) contentArea.removeTab(contentArea.mTabContainer.childNodes[i]);
}
Marc

maubp
 
Posts: 281
Joined: December 5th, 2002, 12:36 pm
Location: UK

Post Posted March 13th, 2003, 6:19 am

mboullet wrote:Chris,
The code is quite obvious. I just added it to my soon to be released All-in-One 0.3.
Here it is:

contentArea = document.getElementById("content");
tabCount = contentArea.mPanelContainer.childNodes.length;
if (tabCount > 1) {
var activeTab = contentArea.mTabContainer.selectedIndex;
for (var i = tabCount-1; i >= 0; --i) // reverse order is important
if (i != activeTab) contentArea.removeTab(contentArea.mTabContainer.childNodes[i]);
}

Mark - Is it really a good idea to put this into your All-in-One extension? I think of it as a very usefull set of mouse related features. IMHO, TBE has grown to be too big and complicated - I don't want to see that happen to your work.

Maybe it would be better just for Chris to put it in his "Tabbrowser Preferences" aka "TBE Lite".

Also, what would happen if two extensions where active that both try to add this menu item?
Peter

mboullet
 
Posts: 337
Joined: November 5th, 2002, 2:34 am
Location: France

Post Posted March 13th, 2003, 7:49 am

maubp wrote: IMHO, TBE has grown to be too big and complicated - I don't want to see that happen to your work.


I will add it as a gesture (it is just 5 lines of code), so no problem of extension collision.
Don't worry, I'm very concerned about keeping the extension as small as possible.
Marc

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 3 guests