Our Low Overhead Means Lower Costs For You!


Firefox: Remove Open in New Page from Right Click Context Menu

Read Time: 3 mins

Updated to work with the latest Firefox and Windows 10 updates.

I have used Firefox as my default and preferred browser for several years and despite its declining market share I still find it to be the fastest loading and fastest rendering browser, significantly outperforming the next best option, Edge, or Google Chrome. As the Firefox download page says:

Get the browser that protects what’s important
No shady privacy policies or back doors for advertisers. Just a lightning fast browser that doesn’t sell you out.

Over the years, I have customized Firefox quite a bit so that it behaves the way I want it to and so that is gives me quick and easy access  to the tools and features I use daily for my work.

One feature that until recently had eluded me is the Firefox right-click context menu on desktop. By default, the top two items in that menu are “Open in new tab” and “Open in new window”. I frequently use the first of these (new tab) and rarely use the second, but due to their physical proximity in the menu I found I was often opening a new window I didn’t want. It’s also an unnecessary option for me, since on rare occasions when I actually do want a new window that option is just a Ctrl+N click away.

How to Remove “Open in New Window”

Step 1

In a new tab, bring up the “about:support” page, either by typing that into the address box or using the Firefox menus to get there:

Now, from that page look for Profile Folder in the left column:

Then click on Open Folder.

Now in Windows File Explorer, in that folder look for a subfolder titled chrome – in a default Firefox installation, that probably won’t exist so create the new folder. Make sure you name it chrome, all lower case – it’s case sensitive.

Go into the folder and create a new plain text file titled userChrome.css.txt and then rename it to just userChrome.css. Again, the filename is case sensitive so make sure you use that exact title. Edit the file in a plain text editor like Windows notepad.exe or Notepad ++ so it contains the following contents:

#context-openlink,
#context-openlinkprivate,
#context-savelinktopocket,
#context-sendimage,
#context-viewimageinfo,
#context-sendlinktodevice,
#context-inspect,
#context-inspect-a11y {
display:none!important;
}

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

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

Save that file.

Then close and restart Firefox and your new right click context menu will look something like this (I have some extensions active so you won’t see all the options pictured here and depending on what extensions you use there may be others not shown here):

 

 

 

 

 

 

 

 

Open Link in New Tab is still there. Open Link in New Page is gone.

 

 

Social Sharing

Leave a comment

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.