(Don’t) Close Firefox with Last Tab

Prior to Firefox 3.5, the default behavior of closing the last tab was to leave a blank tab. That changed in Firefox 3.5, and the default behavior is now to close the whole window with the last tab. If you’re on Windows or tend to close tabs with Ctrl-W, like me, this can be pretty annoying if you forget about it, what with reopening the browser and all.

Fortunately, it’s easy to change.

Venture into about:config. Go to the address bar and enter “about:config” and press enter. You’ll see a long list and at the top, a text box called “Filter:”

closewindowwithlasttabBuyer Beware here. You probably saw a warning when you tried to go to about:config. That’s because you can significantly alter the behavior of Firefox here, and you need to be either very careful about what you change, or very confident in your ability to fix it.

Enter “tabs” into the filter and you’ll see a list like the picture above. There may be more items depending on the addons you have installed. Now look for “browser.tabs.closeWindowWithLastTab” and double click it. It should turn bold, and in the right columns it will say “user set” “boolean” “false”.

That’s it!

Of course, if you’re not comfortable mucking about in about:config, or you also want to restore the close button to that last tab, there’s an addon* for that.

* Of course, I haven’t used, and can’t vouch for, that addon, but it’s there.

Upgrade Flash in Firefox

If you upgraded Firefox lately, you might have seen a message on the start page urging you to upgrade Flash. As of yesterday, something like 12 million people had clicked through to upgrade. That’s a great number.

However, when you got to the Adobe site, and clicked the “Agree and Install” button, instead just saving an installer file, you might have seen this:

update-flash-1Right there? That’s enough to deter me from this whole process, so I can definitely understand if it scared you off. But this is an important update, a security update, so you need to do it.

Fortunately, it’s very easy to get around this annoying development in Flash. (Their hearts are in the right place, automatic updates, but their implementation leaves something to be desired. Of course, the Adobe Updater makes you quit Firefox to update Photoshop, so this clearly isn’t their strong suit.)

For starters, head to Adobe’s Get Flash page. If you see that annoying bar, click on the [x] in the right corner:

update-flash-2Now, more towards the middle of the page, look for a link that says “click here to download.”

update-flash-3That will start downloading the normal installer we’ve come to know and love. Yeah, you’ll still have to restart Firefox, but you were going to need to do that, anyway.

There you have it, avoiding Adobe’s strange new extra software and getting Flash up-to-date with the latest (really, really important) security fixes.

Firefox: Open in Blank Tab

If you don’t use Firefox 3, go get it. Then finish this article. (Safari and Opera users are excused, but there’s no promise this will work for them.)

One of my (few) gripes with Firefox is that bookmarks on the toolbar have no “open in blank tab” option. They have an “open in sidebar” option, but those uses are rare and esoteric at best. Personally, I never use the sidebar.

“Open in blank tab” should basically do this: if there is a blank tab, use it; if not, create a new tab. Frankly, it could just open in a new tab regardless, but it seems like such an easy thing to add.

But? It can’t be done directly in Firefox. Hence, I present this small script:

javascript:
(function(){var u=‘http://mail.google.com/mail’;
  if(window.location==‘about:blank’){
    window.location=u;
  }else{
    window.open(u,);
  }
)();

That’s it. Try dragging this link to GMail to your bookmark toolbar. Then click the link on your toolbar. Now, open a new tab, and click the link again.

This isn’t exactly what I asked for. It has no way of knowing if any blank tab exists, only if the current tab is blank. And, of course, it lacks the nice favicon support.

But it does the job. If you change the variable u to something other than ‘http://mail.google.com/mail’, you can make the link open any other page.

I love anonymous functions.

Update: If you want a bookmark for something besides GMail, you can create your own. Or you can drag this link to your toolbar, to make new ones whenever you want: Open in Blank Tab.

Update 2: Oops, fixed the “create your own” link. Tested it, then accidentally pasted in the results, instead of the actual script.