Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Removing entry from "closed tabs" list
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
skryp...@yahoo.fr  
View profile  
 More options Oct 23 2008, 11:42 am
Newsgroups: mozilla.dev.extensions
From: skryp...@yahoo.fr
Date: Thu, 23 Oct 2008 17:42:29 +0200
Local: Thurs, Oct 23 2008 11:42 am
Subject: Removing entry from "closed tabs" list
I can't find a way to remove (for an add-on about privacy) an entry from the
"closed tabs" list.
I have found the list of closed Tabs (in nsISessionStore), but I can figure
out how to remove one.

Any hint ?

Regards
--
Benoit Bailleux


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Bünzli  
View profile  
 More options Oct 25 2008, 7:41 am
Newsgroups: mozilla.dev.extensions
From: Simon Bünzli <zen...@gmail.com>
Date: Sat, 25 Oct 2008 13:41:07 +0200
Local: Sat, Oct 25 2008 7:41 am
Subject: Re: Removing entry from "closed tabs" list
skryp...@yahoo.fr schrieb am 23.10.08 17:42:

> I can't find a way to remove (for an add-on about privacy) an entry from
> the "closed tabs" list.

If you want to remove _all_ closed tabs, just set
browser.sessionstore.max_tabs_undo to 0 and then back to its original value.

Removing a single closed tab isn't that simple. I've filed a bug about
this (see https://bugzilla.mozilla.org/show_bug.cgi?id=461634 ), but
until the API has been extended, you can use the following work-around
(leads to some flickering, but does the job):

function forgetClosedTab(aIndex) {
   var selectedTab = getBrowser().selectedTab;

   // reopen the tab to forget
   var tab = undoCloseTab(aIndex) || gBrowser.selectedTab
   var browser = gBrowser.getBrowserForTab(tab);

   // load a blank document and clear its history
   browser.contentDocument.location = "about:blank";
   with (browser.webNavigation.sessionHistory) PurgeHistory(count);

   // don't wait for the tab to complete loading
   // (this clears data associated with partially loaded tabs)
   var event = document.createEvent("Events");
   event.initEvent("load", true, false);
   browser.dispatchEvent(event);

   // close the tab for good (blank tabs can't be reopened)
   gBrowser.removeTab(tab);
   gBrowser.selectedTab = selectedTab;

}

Cheers,
Simon

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
skryp...@yahoo.fr  
View profile  
 More options Nov 18 2008, 2:11 am
Newsgroups: mozilla.dev.extensions
From: skryp...@yahoo.fr
Date: Tue, 18 Nov 2008 08:11:59 +0100
Local: Tues, Nov 18 2008 2:11 am
Subject: Re: Removing entry from "closed tabs" list
Simon Bünzli a écrit :

> [...]
>   // close the tab for good (blank tabs can't be reopened)
> [...]

Thanks for the trick (I didn't know that "blank tabs can't be reopened").
I could not try it until this last week-end, but it works as I need.

By the way, do you agree / mind to be listed as a contributor in my little
extension ?

Regards,
--
BBa


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »