Icons for your bookmarks

The current versions of Mozilla have the custom bookmark icons disabled. Normally these appear automatically if you bookmark a site that has a favicon.ico file in the correct directory or has set a custom icon. You will also see these icon on the left of the url textbox.

Take a look by going to www.newegg.com.

You will have to edit a couple of compressed files to get this to work.

1.) Extract the files
Locate the comm.jar file. It'll be in <program files>\mozilla.org\Mozilla\chrome. You can either unjar if you are familiar with jar or change the extension to .zip and use winzip. WinRAR will recognize the file as an archive without having to change the extension.

2.) Modify navigator.xul
The first file to change is called navigator.xul, you can find it at content\navigator. Find this section of code:

<rule parent="hbox">
  <toolbarbutton class="bookmark-item" uri="rdf:*" editable="true"
    status="rdf:http://home.netscape.com/WEB-rdf#status"
    rdf:type="http://home.netscape.com/NC-rdf#Bookmark"
    statustext="rdf:http://home.netscape.com/NC-rdf#URL"
    tooltip="ptTooltip"
    label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</rule>

change it to this

<rule parent="hbox">
  <toolbarbutton class="bookmark-item" uri="rdf:*" editable="true"
    image="rdf:http://home.netscape.com/NC-rdf#Icon"
    validate="never"

    status="rdf:http://home.netscape.com/WEB-rdf#status"
    rdf:type="http://home.netscape.com/NC-rdf#Bookmark"
    statustext="rdf:http://home.netscape.com/NC-rdf#URL"
    tooltip="ptTooltip"
    label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</rule>


Then find this section:

<rule nc:FolderGroup="true" iscontainer="true">
  <menupopup>
  <menuitem class="menuitem-iconic bookmark-group"
    label="rdf:http://home.netscape.com/NC-rdf#Name"
    group="true"
    uri="rdf:*"
    xulcontentsgenerated="true"/>
</menupopup>

and change it to this:

<rule nc:FolderGroup="true" iscontainer="true">
  <menupopup>
  <menuitem class="menuitem-iconic bookmark-group"
    src="rdf:http://home.netscape.com/NC-rdf#Icon"
    validate="never"

    label="rdf:http://home.netscape.com/NC-rdf#Name"
    group="true"
    uri="rdf:*"
    xulcontentsgenerated="true"/>
</menupopup>

3.) Modify navigatorOverlay.xul
In navigatorOverlay.xul which you'll find in the same directory, change this:

<menupopup>
  <menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
    label="rdf:http://home.netscape.com/NC-rdf#Name"
    status="rdf:http://home.netscape.com/WEB-rdf#status"/>
</menupopup>

to this:

<menupopup>
  <menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
    src="rdf:http://home.netscape.com/NC-rdf#Icon"
    validate="never"

    label="rdf:http://home.netscape.com/NC-rdf#Name"
    status="rdf:http://home.netscape.com/WEB-rdf#status"/>
</menupopup>

4.) Zip the files
Zip up the files again using winzip, making sure that the recreate the exact same directory structure. This means zip up the content directory not the comm directory.

5.) Customize your bookmark icons
If you want to assign your own icons to your bookmarks, you can edit your bookmark.html and add this property to your bookmark links:
ICON="http://www.newegg.com/images/logo1.ico"


This information was gleamed from this newsgroup thread:
http://groups.google.com/groups?selm=5dc300a6.0208150324.37433a8c%40posting.google.com


Thanks go to Nige and Neil.

» posted by lawrence on October 24, 2002 at 12:39 PM

Comments

The only thing I see on the page is "We are currently conducting routine system maintenance." plus some other texts.. Hmm?

# posted by cheeaun

very cool. i wonder if there is a way to preserve this functionality from build to build (for those of us who test nightlies) through the userContent.css file or some similar method?

# posted by slippery slope

excellent. i was amazed to see this not enabled by default.

many thanks for the hack.

# posted by pip

Cool, works well for bookmarks but what about the personal toolbar? Can't seem to display site icons there.

# posted by Eric

yes, anyone know how to display site icons on personal toolbar? I don't see bookmarks every time my browser is open but I do see personal toolbar and icons are PRETTY. :) Thx in advance.

# posted by Hummer

Well, Everybody is posting stuff so i'll do it too! here are my links:

# posted by Alex Dolbayov

Hello, a question at you. Unfortunately in the Blog,
since I have found none Webmaster eMail address. ;-((

Is your Blogscript a good Script for Blogs?
Does it run solidly and comfortable?

I`m the Webmaster of www.weight-loss.tc and want install a
good Weight Loss/Diet Blog and OnlineCommunity (Forum comes from phpBB)
at the site. Please to webmaster@topchance.info or here in the Blog.

Thank you!

Fit regards

Andy

Weight Loss

# posted by Andy

nice site!

# posted by Anna

Post a Comment

This discussion has been closed.