How To Remove The “Open In New Window” Option In Firefox

Ads by Google

The feature that defines Firefox the most is tabs so it beats me why they have a “Open Link In New Window” option in their right-click mouse menu. It’s the one feature that is guaranteed to have me fuming and stomping in record time – if I am clicking weblinks fast and I accidently click on the “new window” option instead of the “new tab” option.

The number of times I have accidently opened new browser windows and then had to close them all one by one is just unbelievable. Finally I snapped and I started to look for a solution before I turned to serial homicide as a lifestyle choice.

I finally discovered a small and easy tweak to remove it from the right click menu permanently. It just involves a small addition to the userchrome.css file in your Firefox profile. It takes literally 10 seconds and it is VERY easy.

The first thing you have to do is go to your Firefox profile in your computer. This is normally found at

C:\Documents and Settings\<username>\ Application Data\Mozilla\Firefox\Profiles\

Inside your profile, there is a sub-folder called “chrome”. If you click on that, you’ll find two files inside :

You don’t have to touch the “userContent” one. The one we’ll be looking at is the “userChrome” file.

First, rename it to userchrome.css (if you don’t already have a file by that name) then open it up.

You’ll see some text there already. You can ignore that. Underneath that text, add the following :

/* Never show “Open in New Window” when right clicking */
#context-openlink {display: none !important;}

Then save your changes and close the file. Restart your Firefox browser. Then right-click on a webpage link and you’ll find the “new window” option gone!

This is great. Not having that “new window” option there is saving my sanity and everything is now opening in tabs in the same browser window.

The userchrome.css file can be used in lots of different ways to customize the look of your Firefox browser. I am going to start doing some research into this and maybe write some posts on this in the near future. In the meantime, does anyone out there have any useful userchrome tweaks to share with us?

Join live MakeUseOf Groups on Grouvi App Join live Groups on Grouvi
Mozilla Firefox Fans
Mozilla Firefox Fans
30 Members
Google Chrome Mastery
Google Chrome Mastery
30 Members
Best Mobile Browsers
Best Mobile Browsers
25 Members
Safari Browser Tips
Safari Browser Tips
16 Members
Internet Explorer (IE) Tips
Internet Explorer (IE) Tips
4 Members
Ads by Google
Comments (21)
  • Blasty711

    This tip didn’t work for some reason but Menu Editor did the trick.

  • Karl L. Gechlik

    Awesome post!

  • Danielle

    Mark – Have you by any chance figured out how to keep Firefox from popping tabs out into a new window. I think it’s a new feature from the recent upgrade that allows you to drag a tab down from the tab row and that automatically puts it in a new window. I HATE THIS FEATURE as I am constantly doing it accidentally, then having to drag the tab back to the original window. Maybe I’m just a lazy clicker, but still…

    Any advice?

    Thanks!

    • Peter

      Danielle! Did you find a solution to the drag tab down and open new window? It’s also driving me mad!
      Peter

  • xblog

    This is great, but it does not work on Windows 7, because of folder restrictions. Any workarounds there?

    Thanks.

  • c-fish

    it works~~thank u~~

Load 10 more
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.