Firefox 4 URL Trimming – Display Full Web Addresses

Here’s an interesting trick for getting around Firefox 4’s annoying habit of trimming URLs …

Probably one of the most annoying features of Firefox 4 is url trimming. The web address of a link is displayed in the bottom left corner of the browser when you hover over it with the mouse. The problem here is that the Mozilla’s developers decided to trim that address when it reaches a certain length. The url is trimmed in the middle which sometimes makes it impossible to identify the full url or the title of an article on a blog.

This caused lots of troubles for me when moderating WordPress comments as I was rarely able to hover over the comment link to see which article the comment was posted on, an example follows below.

firefox link address

I always had to click through to get the url of the article the comment was posted on. But it was not only on WordPress that I noticed that trimming urls was not ideal, especially since I had enough space to display the full url information. I can somewhat understand that the devs are trimming url link information if the space is not sufficient to display the full url, but why are they trimming the link information even if enough space is available?

After some experimenting I finally managed to change the feature to force it to use all available horizontal space for the url display before it would be trimmed.

firefox web address

Properties in Firefox are largely handled by styles. I discovered a way to get rid of trimmed urls in Firefox, but it involves adding style information to the userChrome.css file. The easiest way to locate that file is to enter about:support into the Firefox 4 address bar and then on the Open Containing Folder button. This opens the root Firefox profile folder. Open or create the folder chrome and look for the file userChrome.css. If it exists open it in Notepad or another plain text editor. If it does not exist create a new plain text document (.txt) and rename it to userChrome.css.

Add the following lines of code to the document.

statuspanel {
max-width: 100% !important;
}

You can modify the 100% value if you like if you prefer to limit the display of the link information. A value of 50% would for instance use half the horizontal space of the browser window to display the link in the status bar. Keep in mind that Firefox may trim urls more occasionally if you select a lower value.

Save the document afterwards and restart the Firefox browser. The urls should now use all of the horizontal space to display the web address when you hover the mouse cursor over links. Please note that it still may trim urls, but this happens only in the case if the full url cannot be displayed on one line on the monitor which should not happen to often.


© Martin Brinkmann for gHacks Technology News | Latest Tech News, Software And Tutorials, 2011. | Permalink | Add to del.icio.us, digg, facebook, reddit, twitter
Post tags: ,

Link to Original Content

Tags: , , ,

Comments are closed.