
Earlier this month, I
posted an entry complaining about how the context menu items "Reload Live Bookmark" and "Sort By Name" are too close to each other. After mistakenly sorting my Bookmarks Toolbar Folder yet again, I finally found a way to do something about it.
Disclaimer: Follow these instructions at your own risk. You may break your browser. Although I did not find an extension to do this, I'm pretty sure that using one would be a better approach than the one I'm taking here. If you are as annoyed as I was about this, then please, read on.
I couldn't find an extension for this, and I didn't dig too deep into the developers documentation, but I did find something in the
chrome/browser.jar file. In order to remove the option you need to edit a file in that archive.
- Backup the file browser.jar before starting. You may screw something up and have to start over. You should find it in the chrome folder, found under the Firefox install directory.
- Unzip browser.jar to a temporary folder. This file is an uncompressed archive that you can open using a utility like WinZip.
- Find the file content/browser/bookmarks/bookmarks.js in the directory structure you just created from the archive. You'll want to edit this file.
- Find the case statement referring to the context menu for an item of type "Livemark". Search for the following text:
case "Livemark":
It should start on line 308 or thereabouts. - On the next line, you'll see a list of commands. Find the text "bm_sortbyname", (complete with quotes and the trailing comma). Remove it and save the file.
- Re-create browser.jar by creating a ZIP file from your directory structure. Make sure not to use compression with the archive. After creating the ZIP file, rename it to browser.jar and copy it to chrome directory.
That's it. The entry for "Sort By Name" is now removed from the context menu that comes up when you right-click on a Live Bookmark. I do believe that this is probably not the best way to do this, as this file gets updated when you upgrade your browser. You may have to repeat the above steps after an upgrade to get rid of it again.
Hopefully this will be the last time I accidentally re-sort my Bookmarks Toolbar Folder.
Labels: bookmarks toolbar, firefox, sort by name