July 31, 2014
 
 
RSSRSS feed

Why Firefox Rocks: Great Firefox Tricks, Part IV - page 3

The Plague of Ridiculously Long URLs

  • November 20, 2008
  • By Akkana Peck

In Firefox 2 and earlier versions, this ability to handle multi-line URLs worked only on Linux. A nice benefit for Linux users! It worked due to the way single line text fields handled pasting of multiple lines: on Windows and Mac, if you pasted more than one line Firefox would just chop off the extra. But in Firefox 3, finally all platforms get the benefit of multi-line URLs, and we can't feel quite as special any more.

If you're still using Firefox 2 and want multi-line URLs on Windows or Mac, or if you want to make your text fields handle multi-line pastes in a different way in any version of Firefox, you can use the preference editor.singleLine.pasteNewlines. For instance, if you use Chatzilla, sometimes it's useful to be able to paste multiple lines (option 0).

Load about:config and search for newlines. Here are the possible values (options 4 and 5 are new for Firefox 3):

  1. Paste newlines intact (the Linux default from Firefox 2 and earlier)
  2. Paste up to the first newline
  3. Replace newlines with spaces (the new default)
  4. Strip newlines
  5. Replace with commas
  6. Strip newlines and surrounding whitespace

After changing the preference, you'll have to restart the browser before you'll see its effect.

References

Quick Firefox Tip: Word Count Bookmarklet
Roll Your Own Custom Bookmarklets In Firefox, part 2
Stupid Firefox Tricks, Part I
Why Firefox Rocks on Linux: Great Firefox Tricks, Part III

That's it! So next time your mailing list starts up on "That link didn't work -- it was too long!" don't wait for the TinyURL. Just paste it into Firefox and you're all set.

Akkana Peck is a freelance programmer and writer and the author of Beginning GIMP: From Novice to Professional. She also wrote Firefox's original multi-line paste implementation.

Sitemap | Contact Us