Results tagged “firefox”

I've just finished a short greasemonkey userscript (get the userscript here) which fixes the display of pages at the excellent, free, online TCP/IP guide at www.tcpipguide.com/free/. The TCP/IP Guide is displayed on html pages which rely heavily on html table elements for their layout and the table cell containing the main content for a page is missing a "valign" attribute and so defaults to a value of "middle" when rendered by the browser. This is annoying because there's an area of white space above the main content which is most pronounced when the browser window is very wide - see an example at this page.

Greasemonkey is a cool add-on for the firefox browser which allows you to modify and extend html pages with short snippets of JavaScript giving you some control over how those pages are displayed or alter and extend their functionality.

This particular userscript sets the "valign" attribute of the cell in question with a value of "top" - a very simple thing to do, but it took me bloody ages to get it right. If it doesn't work for you, please leave me a comment and let me know.

Get the userscript at http://jahboite.co.uk/files/js/the_tcpip_guide_fix.user.js.

When using a web application proxy, such as those found in WebScarab, Paros Proxy or Burp Suite, it's useful to have a second firefox window open which uses a different user profile set-up to connect through the local web proxy server.  Having a separate instance of firefox running a different user profile means that one instance can be used for general browsing and the other can be used for web application testing or auditing so that the information collected via the proxy isn't diluted with normal browsing requests.

Running a separate instance of firefox is easy to achieve and here's the steps involved:

First, create a new firefox profile:

  • Start firefox from the command line using the options -no-remote -P (e.g. "C:\Program Files\Mozilla Firefox\firefox.exe" -no-remote -P).
  • When the Choose User Profile dialog box opens, click Create Profile to start the Create Profile wizard.
  • Click Next, give the profile a name and optionally change the directory where the profile will be stored.
  • Click Finish, select the newly created profile in the Choose User Profile dialog and click Start Profile.
Configure the new profile to use the web application proxy:

  • Install the switchproxy add-on for firefox and, of course, don't forget the Noscript add-on without which no firefox profile is complete.  Restart firefox to complete installation.
  • Create a new proxy profile for use with your favourite web application proxy.  For example, the proxy in burp suite v1.2 is available via loopback port:8080 by default so:
    • In firefox: Tools > SwitchProxy > Manage Proxies
    • In the Manage Proxies dialog: click Add, select Standard and click Next.
    • In the Proxy Info dialog, add a name for these proxy settings in the Proxy Label field, add 127.0.0.1 into the HTTP Proxy field and 8080 in the corresponding Port field and click OK twice.

If firefox was open before doing the above, the new profile will be open in a separate window.  The key to open multiple instances of firefox is to use the -no-remote -P options of the firefox executable.
The -P option takes the name of the profile as an argument and supplying a valid profile name will launch firefox straight into that profile instead of the Choose User Profile dialog.  Therefore a handy shortcut can be created by modifying an existing shortcut to firefox to add to the command: -no-remote -P "New Firefox Profile Name"

Voila, open a separate instance of firefox ready to work with a web application proxy.

UPDATE: 2008-06-29T23:08 +0100 UTC

There's now an easier way to import your del.icio.us bookmarks and tags into firefox 3. In a forum post at mozillazine.org, watanabe described a process using a ruby script (written by the same) to combine a firefox bookmark backup file (in .json format) with a del.icio.us bookmarks export file (in .xml format) to create a new .json file for firefox 3.

The good news is that based on this script, a clever chap named Ben Hayes (and his friend) has created a nice and simple web-interface to import del.icio.us tags into firefox 3 which you can find at http://delicious.e-accent.com.
 

firefox_3_cert.thumb.pngOn Tuesday, at 8pm (forty-four minutes after the 11:16am PST release time), I upgraded to the all new Firefox 3 and so contributed to the Guinness World Record for the most downloads of a piece of software in a 24 hour period. I must say, the World Record spin is a bit of a farce since doing things like checking for updates to the add-ons (which were incompatible with version Firefox 3) took an age - as did trying to find any information on mozilla's site. That aside, I've spent an enjoyable evening checking out the new features and improvements. One of the things I really like is the long-awaited tags for bookmarks. It's now possible to tag bookmarks and to enter tags into the address bar to find those bookmarks. This is an awesome feature and one that will undoubtedly improve my ability to find stuff I know I've bookmarked...

Up to now, I've been using del.icio.us and the del.icio.us add-on for firefox which has helped a bit, but still falls short of the ideal. So now I want to import all of my del.icio.us bookmarks into firefox with all of the tags in place. Unfortunately, exporting del.icio.us bookmarks to an html file (which includes tag information) and then importing the html file into firefox 3 doesn't help because the tags aren't created in firefox. A little googling on the subject yielded a blog post at fansoftech.com which points to a partial solution using Flock 2.0 beta, a "social web browser". Flock 2 uses the Firefox 3 codebase and also integrates well with del.icio.us and can export a .json bookmark file with all the tag information in it.

At the time of writing, the blog poster had managed to import del.icio.us tags into Firefox, but hadn't managed to get the bookmarks themselves to show-up in the bookmarks side-bar:

"What's strange, and something I've yet to figure out, is that the bookmarks DON'T display in the area on the left when selecting a tag in the nav area. However, when you type in a tag or a keyword relating to a site you've bookmarked from inside the location bar (a.k.a. "awesomebar" or "address bar") in the main Firefox window, the appropriate results display".

I can confirm though that it is possible and, very simply, involves exporting favourites from Flock 2 as a .json file, exporting favourites from del.icio.us as an html file and then importing both them both into Firefox 3. It's a bit more involved than that and there's a couple of potential pitfalls, but I'll describe the whole process here. First, you want to make sure that all your Firefox bookmarks are available in del.icio.us using the import html file facility on the website:

  • From Firefox, Bookmarks > Organise Bookmarks > Import and Backup > Export HTML... and save the html file somewhere.
  • Then login to del.icio.us and head to Settings and under Bookmarks, click import / upload. Browse to the html file you've just exported from firefox and make sure "Only import items I don't already have" is selected before clicking the import now button. And wait.
  • While you're waiting, head to http://www.flock.com/beta/download and download and install Flock 2.
  • Wait for your upload to del.icio.us to finish and then it's a good idea to spend some time checking over your tags, removing or renaming those created by the import and generally tidying-up. Time spent here will be well spent.
  • Now fire-up Flock 2 and login to the del.icio.us website. You'll see an information bar appear with a "Remember Account" button. Click this and then, very slowly, your del.icio.us bookmarks will start to download into Flock - tags and all.

This may take a long time and it's important to wait until it's finished. From within Flock it's possible to see the progress of tags downloading by opening Favourites > Organise Favourites and click on tags in the left-hand pane of the Library dialog. In the right hand-pane click the right-hand scroll bar and then below the list of tags you'll see the number of items and this number will increase as tags are added. To find out how many tags you're expecting when the process has finished, select your favourites on your del.icio.us website page and at the bottom of the right-hand column under tag options choose "view as cloud" and "hide bundles". Now select the entire tag cloud and paste it into a text-editor which can display line numbers and you should have a tag per line and the last line number shows you the number of tags you have.

  • While you're waiting export your del.icio.us bookmarks to html from the website by heading again to Settings and then export / backup and save the html file somewhere.
  • When your del.icio.us bookmarks have finally finished downloading to Flock you can delete any Flock specific bookmarks that you don't want to transfer to Firefox.
  • Still in Flock, in the Library dialog, click Import and Backup > Backup and save the .json file along with the html file you exported from del.icio.us.
  • You're almost there!
  • Now head back to Firefox, Bookmarks > Organise Bookmarks > Import and Backup > Restore > Choose File.. and select the .json file exported from Flock. This will overwrite all your current bookmarks and replace them with your tags from del.icio.us.
  • Then Import and Backup > Import HTML... select Import Bookmarks from: From an HTML file and click Next, select the html file you exported from del.icio.us and voila!

Now you should have Bookmarks and Tags in Firefox 3 from del.icio.us. Job's a good'n!

It's worth noting that you will have lost any folder structure you had previously in Firefox and that the bookmarks will all be in the bookmarks menu. You'll soon discover you don't need a folder structure though as you can find any bookmark based on it's tag from the Address bar. If you know of any other ways to achieve the same result without using Flock then do drop me (jah) a line. Happy surfing!
1

Recent Entries

  • The TCP/IP Guide - Greasemonkey Userscript

    jah has written a greasemonkey userscript to fix the page layout for The TCP/IP Guide free online edition - it's very simple, but it took him ages!...

  • PicaVue

    jah has begun work on an open source javascript gallery to display his Picasa Web Albums - it's called PicaVue...

  • Nmap 5 - An Introduction

    The newest version of Nmap - Nmap 5.00 - is now available for download and is the best Nmap ever. This is a short introduction to Nmap and the Nmap family of tools: Zenmap; Ncat and Ndiff which are included with this latest release....

  • Enable apache mod_userdir on Debian

    How to enable mod_userdir for apache2 on Debian 5.0 (Lenny)....

  • Nmap 4.85BETA5 and Conficker detection

    Nmap 4.85BETA5 is now available and is able to remotely and anonymously detect hosts compromised with Conficker (downadup, kido) using an NSE script....