Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old March 16th, 2007   #1
adam.tropics
Fresh Brewed Ubuntu
 
adam.tropics's Avatar
 
Join Date: Nov 2005
Location: Little Weighton, Hull, UK
Beans: 1,286
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to adam.tropics Send a message via Yahoo to adam.tropics
How to make Firefox bookmark Manager open in a tab instead of new window.

I was wandering around Mozilla Forums today, as you do, and came across this one. It's not all that new, but if,as I do, you have a dislike to new windows opening everywhere, and choose not to use Opera, then this may be for you.

The goal is to be able to organise bookmarks from a tab, rather than opening a new window. To do this involves installing an extension, called userChrome.js which gives you more control over the javascript firefox runs. You can install it here. There is also a VERY long thread here that goes into all sorts of other little things that can be done with it, but for the purposes of this brief guide we're really only interested in one.

Once the extension is installed, find your firefox profile folder. This is generally in a hidden folder in your home directory,called ~/.mozilla/firefox/XXXXXX.default where XXXXXX represents some ridiculously long random id.

Anyway, inside that folder, enter the chrome folder. If you do not see a file called userChrome.js then create one with your favourite text editor.

Into that file, you need to put:

Code:
// JavaScript Document 
 
 /* Bookmark Manager open in Tab */ 
 document.getElementsByAttribute("key", "manBookmarkKb")[0].setAttribute("oncommand", '(getBrowser().selectedTab = getBrowser().addTab("chrome://browser/content/bookmarks/bookmarksManager.xul")).label = "Bookmarks Manager";');
..and you're done. Restart firefox, and from your bookmarks menu, click organise bookmarks, and with a little luck...presto!

You can use a similar approach with the download manager and History Show in Tabs with the code below, but personally, I don't find those two nearly as handy.
Code:
/* Download Manager open in Tab */ 
 document.getElementById("Tools:Downloads").setAttribute("oncommand", '(getBrowser().selectedTab = getBrowser().addTab("chrome://mozapps/content/downloads/downloads.xul")).label = "Download Manager";'); 
  
 /* History Manager open in Tab */ 
 document.getElementById("viewHistorySidebar").setAttribute("oncommand", '(getBrowser().selectedTab = getBrowser().addTab("chrome://browser/content/history/history-panel.xul")).label = "History Manager";');
If you change your mind, simply uninstall the extension, and you may have to manually remove userChrome.js, then just restart your browser.

This will also work in Swiftfox btw. Have fun.


Attached Images
File Type: png Screenshot-Bookmarks Manager - Swiftfox-2.png (141.3 KB, 15 views)
__________________
~~ Ubuntu Forums Firefox/Flock Menu ~~ Ubuntu User Number 206 ~~ Linux user number 403379 ~~

~~ If someone asks you to sudo rm -rf anything don't do it. ~~

Last edited by adam.tropics; March 19th, 2007 at 09:47 AM..
adam.tropics is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:56 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry