View previous topic :: View next topic |
Author |
Message |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Mon Jul 05, 2004 5:13 am Post subject: Firefox Information / Customizing / Hacking / Screenshots |
|
|
I'm hoping this post is going to create a central respository of information on Firefox. If you reply to this post, please follow the format which is outlined below.
Firstly though, here are a few helpful links:
Firefox Extensions @ Texturizer
Firefox Themes @ Texturizer
Mozilla Update (Themes / Extensions)
Customizing Mozilla
Firefox Tips & Tricks
A few more customizing sites...
http://www.geocities.com/pratiksolanki/
http://www.mozilla.org/unix/customizing.html#prefs
http://farrokhi.net/blog/archives/000235.html
If you have any links for me to add to this list, just put them in your post
Okay, now thats out of the way, here is a sample outline for you to use when posting!
Note: This isnt actually *my* information, it is just example information. I will be posting mine below.
First up, post your Firefox version.
Firefox 0.9.1
Secondly, post information on any theme(s) you are using:
Themes
GTK: Industrial
Firefox: Default
Thirdly, list your extensions, preferably with URLs.
Extensions
Cute Menus
Tabbrowser Extensions
Next up, post your userChrome.css, userContent.css, user.js, and any other files you have hacked up in a code block.
userChrome.css
Code: | /* Your userChrome.css here */ |
userContent.css
Code: | /* Your userContent.css here */ |
user.js
Code: | // Your user.js here |
Finally, post your screenshot and then any questions / requests you may have.
A good URL to use in your screenshot is either the Firefox start page or the Gentoo homepage
Here is my screenshot
Request
How do I enable feature X in Firefox? |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Mon Jul 05, 2004 5:24 am Post subject: |
|
|
Here's my Firefox stuff
Firefox 0.9.1
Themes
GTK: Industrial
Firefox: Default
Extensions
Cute Menus
Add Bookmark Here
Focus Last Selected Tab
Needlesearch Toolbar
Tabbrowser Preferences Lite
MiniT
UndoCloseTab
Tab X
keyconfig
undoclosetab
mozImage
Show Failed URL
Compact Menu
userChrome.css
Code: | /* Remove the close button on the tab bar */
.tabs-closebutton {
display: none !important;
}
/* Always show Style Sheet Switcher icon in status bar */
#page-theme-button {
display: -moz-box !important;
list-style-image: url(chrome://browser/skin/page-themes.png);
padding: 0px 3px;
}
/* Display the Tab bar at the bottom */
#content > tabbox {
-moz-box-direction: reverse;
}
/* Shrink tab titles by 10% */
.tabbrowser-tabs .tab-text {
font-size: 90%;
}
/* Disable the drop down arrow - Location bar */
.autocomplete-history-dropmarker {
display: none !important;
}
/* Disable the drop down arrow - Forward / Back buttons */
.toolbarbutton-menubutton-dropmarker {
display: none !important;
}
/* Disable icons for greyed menu items - Cute Menus */
menuitem[disabled=true] > hbox > image {
visibility: hidden !important;
} |
userContent.css
Code: | /* Hilight links which will try to open in a new window */
/* This gives a red background on the link, and also the "crosshair" moise pointer on hover */
:link:hover[target="_blank"], :visited:hover[target="_blank"],
:link:hover[target="_new"], :visited:hover[target="_new"] {
color: white !important;
background: red !important;
cursor: crosshair;
} |
user.js
Code: | // Font Stuff
// TrueType
user_pref ("font.FreeType2.enable", true);
user_pref ("font.freetype2.shared-library", "libfreetype.so.6");
// if libfreetype was built without hinting compiled in
// it is best to leave hinting off
user_pref ("font.FreeType2.autohinted", true);
user_pref ("font.FreeType2.unhinted", true);
// below a certian pixel size anti-aliased fonts produce poor results
user_pref ("font.antialias.min", 0);
user_pref ("font.embedded_bitmaps.max", 1000000);
user_pref ("font.scale.tt_bitmap.dark_text.min", 0);
user_pref ("font.scale.tt_bitmap.dark_text.gain", "0.0");
// sample user_pref s for TrueType font dirs
user_pref ("font.directory.truetype.1", "/usr/share/fonts/ttf-bitstream-vera");
user_pref ("font.directory.truetype.2", "/usr/share/fonts/TTF");
user_pref ("font.directory.truetype.3", "/usr/share/fonts/corefonts");
user_pref ("font.directory.truetype.4", "/usr/share/fonts/freetype");
user_pref ("font.directory.truetype.5", "/usr/share/fonts/ttf");
user_pref ("font.FreeType2.printing", true);
// Instead of annoying error dialog messages, display pages
user_pref("browser.xul.error_pages.enabled", true);
// More DOM/JavaScript options
// Make sure all pop-up windows are resizable:
user_pref("dom.disable_window_open_feature.resizable", true);
// Make sure all pop-up windows are minimizable:
user_pref("dom.disable_window_open_feature.minimizable", true);
// Always display the menu in pop-up windows:
user_pref("dom.disable_window_open_feature.menubar", true);
// Always display the Navigation Toolbar in pop-up windows:
user_pref("dom.disable_window_open_feature.location", true);
// Always display the scrollbar in pop-up windows:
user_pref("dom.disable_window_open_feature.scrollbars", true);
// Put an end to blinking text!
user_pref("browser.blink_allowed", false);
// This one makes a huge difference. Last value in milliseconds (default is 250)
user_pref("nglayout.initialpaint.delay", 0);
// Enable pipelining:
user_pref("network.http.pipelining", true);
user_pref("network.http.proxy.pipelining", true);
user_pref("network.http.pipelining.maxrequests", 100); |
Finally, you can find my screenshot here
Requests
Does anyone know of something similar to Galeon's MyPortal page for Firefox?
Is it possible to move menu items to another menu? (I want to move Help -> About into the Tools menu, since I use Compact Menu (see above) to hide the Help menu.
Can you hide the drop down arrow on the "Back" and "Forward" buttons? Like I have done for the Location bar... FIXED.
Figured out and added to my userChrome.css, above.
Is there any way to make middle click in the "content" area load the URL from the clipboard (which it does now), but still allowing middle click on a tab to close the tab?
nagash.
Last edited by nagash- on Mon Jul 05, 2004 1:48 pm; edited 1 time in total |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Mon Jul 05, 2004 1:40 pm Post subject: |
|
|
90 views -- doesnt anyone have *something* to add?  |
|
Back to top |
|
 |
kamagurka Veteran


Joined: 25 Jan 2004 Posts: 1026 Location: /germany/munich
|
Posted: Mon Jul 05, 2004 3:23 pm Post subject: |
|
|
i *really* like the compactmenu button. my only gripe with it is that now i need two clicks to get at my bookmarks. is there an extension out there to just fold out the bookmarks from some button? _________________ If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Mon Jul 05, 2004 3:59 pm Post subject: |
|
|
Isn't there just a bookmarks button which you can add to a toolbar. Or does that load in the sidebar? I cant remember. |
|
Back to top |
|
 |
kamagurka Veteran


Joined: 25 Jan 2004 Posts: 1026 Location: /germany/munich
|
Posted: Mon Jul 05, 2004 4:09 pm Post subject: |
|
|
nagash- wrote: | Isn't there just a bookmarks button which you can add to a toolbar. Or does that load in the sidebar? I cant remember. |
yes, there is. but that loads (as you so correctly suspect) the bloody sidebar. grmbl. _________________ If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word |
|
Back to top |
|
 |
anfpunk Apprentice

Joined: 29 May 2003 Posts: 275 Location: Columbus, Oh
|
Posted: Mon Jul 05, 2004 4:50 pm Post subject: |
|
|
kamagurka wrote: | i *really* like the compactmenu button. my only gripe with it is that now i need two clicks to get at my bookmarks. is there an extension out there to just fold out the bookmarks from some button? |
x2!
I have everything in a single line across the top so I love compact menu. I wish I could just put the 5 menu items I actually used in 1 dropdown. It's even worse with cluttered menus now that they moved preferences under edit which I used to remove completely. |
|
Back to top |
|
 |
ikaro Advocate


Joined: 14 Jul 2003 Posts: 2526 Location: Denmark
|
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Mon Jul 05, 2004 11:51 pm Post subject: |
|
|
Heres a tip for anyone serious about hacking their userChrome.css:
Browse to [url]chrome://browser/content/browser.xul[/url], fire up the DOM Inspector (Tools -> DOM Inspector) and get to work. You can find all the CSS properties of your toolbars and stuff with it.  |
|
Back to top |
|
 |
anfpunk Apprentice

Joined: 29 May 2003 Posts: 275 Location: Columbus, Oh
|
Posted: Tue Jul 06, 2004 12:38 am Post subject: |
|
|
nagash- wrote: | Heres a tip for anyone serious about hacking their userChrome.css:
Browse to [url]chrome://browser/content/browser.xul[/url], fire up the DOM Inspector (Tools -> DOM Inspector) and get to work. You can find all the CSS properties of your toolbars and stuff with it. :) |
How do you save the changes that you make with this? |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 1:10 am Post subject: |
|
|
You just need a little CSS know how. Put the changes you make into userChrome.css (in your chrome directory, usually ~/.mozilla/firefox/default.xxx/chrome
For example, to completely get rid of the location bar you would do something like
Code: | #urlbar-container {
display: none !important;
} |
If you know CSS its very easy, if you dont it still isnt too hard, just take a look at my userChrome.css posted above and I'm sure you can figure it out.
The !important tells firefox to use this style rule over any other rule specified by itself / a web page, or whatever.
Another example, changing font of tabs:
Code: | tab {
font-family: aquafont, Bitstream Vera Sans, Serif !important;
font-size: 0.9em !important;
font-weight: bold !important;
} |
Dont quote me on those examples as I'm at work so dont have time to test them, but off the top of my head they are right.
Last edited by nagash- on Tue Jul 06, 2004 1:24 am; edited 1 time in total |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 1:16 am Post subject: |
|
|
Heres another tip, if you already have too many extensions and dont feel like bloating up your browser too much, you can still get rid of menus (instead of using Compact Menus extension) like this..
Code: |
/* Remove the Go and Help menus
(These are just examples. Try changing "Go" to "Edit" or "Bookmarks") */
menu[label="Go"], menu[label="Help"] {
display: none !important;
} |
|
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 1:36 am Post subject: |
|
|
anfpunk wrote: | kamagurka wrote: | i *really* like the compactmenu button. my only gripe with it is that now i need two clicks to get at my bookmarks. is there an extension out there to just fold out the bookmarks from some button? |
x2!
I have everything in a single line across the top so I love compact menu. I wish I could just put the 5 menu items I actually used in 1 dropdown. It's even worse with cluttered menus now that they moved preferences under edit which I used to remove completely. |
Hm, you could always just create a folder called "Bookmarks" or similar in the Bookmarks Toolbar Folder, and just put all your bookmarks in that instead.
Then it works like this. |
|
Back to top |
|
 |
anfpunk Apprentice

Joined: 29 May 2003 Posts: 275 Location: Columbus, Oh
|
Posted: Tue Jul 06, 2004 2:28 am Post subject: |
|
|
nagash- wrote: | You just need a little CSS know how. Put the changes you make into userChrome.css (in your chrome directory, usually ~/.mozilla/firefox/default.xxx/chrome
For example, to completely get rid of the location bar you would do something like
Code: | #urlbar-container {
display: none !important;
} |
If you know CSS its very easy, if you dont it still isnt too hard, just take a look at my userChrome.css posted above and I'm sure you can figure it out.
The !important tells firefox to use this style rule over any other rule specified by itself / a web page, or whatever.
Another example, changing font of tabs:
[code]tab {
font-family: aquafont, Bitstream Vera Sans, Serif !important;
font-size: 0.9em !important;
font-weight: bold !important;
Dont quote me on those examples as I'm at work so dont have time to test them, but off the top of my head they are right. |
Thanks for the help. I dont think I'll be able to get it setup how I want though. Basically I want the menu shown in this example to only have these options in this order.
title = "Menu"
Bookmarks menu
Save Page As
Preferences
Downloads
Extensions
Themes
No other menu items would be available. With the DOM inspector I could figure out the keys and how to begin to make the changes. Not sure how'd I write it out.
www.anfpunk.net/i/comp/firefox.png[/url] |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 2:49 am Post subject: |
|
|
Mmm, I don't think you can really move menu items about and stuff using just CSS. I wouldnt mind doing it myself, havent looked into it much tho.
My guess is it'll require an extension tho.  |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 3:43 am Post subject: |
|
|
Okay, I've got it. I customized my menu for you anfpunk
How does this look?
Thats in Windows tho, when I get home I'll keep playing (Bookmarks doesnt work properly yet) in Linux, and let you know how to do it when I'm done
I wouldnt be surprised if it kills at least a few extensions tho (and quite possibly your browser) 
Last edited by nagash- on Tue Jul 06, 2004 3:45 am; edited 1 time in total |
|
Back to top |
|
 |
anfpunk Apprentice

Joined: 29 May 2003 Posts: 275 Location: Columbus, Oh
|
Posted: Tue Jul 06, 2004 3:44 am Post subject: |
|
|
nagash- wrote: | Okay, I've got it. I customized my menu for you anfpunk :)
How does this look?
Thats in Windows tho, when I get home I'll keep playing (Bookmarks doesnt work properly yet) in Linux, and let you know how to do it when I'm done :) |
That is perfect! Did you use css for it? |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 3:46 am Post subject: |
|
|
No, definately not. I extracted browser.jar (/usr/lib/MozillaFirefox/chrome/browser.jar I think) and then hacked up browser.xul |
|
Back to top |
|
 |
anfpunk Apprentice

Joined: 29 May 2003 Posts: 275 Location: Columbus, Oh
|
Posted: Tue Jul 06, 2004 3:52 am Post subject: |
|
|
nagash- wrote: | No, definately not. I extracted browser.jar (/usr/lib/MozillaFirefox/chrome/browser.jar I think) and then hacked up browser.xul |
Haha, I'll mess around with some stuff. I was messing with the source of Skipstone trying to get it setup with only 1 menu item and it kept crashing on me. Referenced too many places. |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 3:56 am Post subject: |
|
|
anfpunk wrote: | nagash- wrote: | No, definately not. I extracted browser.jar (/usr/lib/MozillaFirefox/chrome/browser.jar I think) and then hacked up browser.xul |
Haha, I'll mess around with some stuff. I was messing with the source of Skipstone trying to get it setup with only 1 menu item and it kept crashing on me. Referenced too many places. |
The parts you want to edit is everything between
Code: | <menubar id="main-menubar" statusbar="statusbar-display" style="border:0px;padding:0px;margin:0px;-moz-appearance:none"> |
and
Heres what I did (I dont know if Windows and Linux are the same)
Code: | <menubar id="main-menubar" statusbar="statusbar-display"
style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
<menu label="Menu">
<menupopup>
<menu id="bookmarks-menu" label="&bookmarksMenu.label;" accesskey="&bookmarksMenu.accesskey;"
datasources="rdf:bookmarks rdf:files rdf:localsearch"
ref="NC:BookmarksRoot" flags="dont-test-empty"
template='bookmarks-template'
onpopupshowing="BookmarksMenu.showOpenInTabsMenuItem(event.target)"
onpopuphidden="BookmarksMenu.hideOpenInTabsMenuItem(event.target)"
oncommand="BookmarksMenu.loadBookmark(event, event.target, this.database)"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
ondraggesture="nsDragAndDrop.startDrag(event, BookmarksMenuDNDObserver)"
ondragdrop="nsDragAndDrop.drop(event, BookmarksMenuDNDObserver); event.preventBubble()"
ondragenter="nsDragAndDrop.dragEnter(event, BookmarksMenuDNDObserver); event.preventBubble()"
ondragexit="nsDragAndDrop.dragExit(event, BookmarksMenuDNDObserver); event.preventBubble()"
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDNDObserver); event.preventBubble()">
<menupopup contextmenu='bookmarks-context-menu'>
<menuitem key="addBookmarkAsKb"
label="&addCurPageAsCmd.label;"
accesskey="&addCurPageAsCmd.accesskey;"
command="Browser:AddBookmarkAs"/>
<menuitem key="manBookmarkKb"
label="&manBookmarksCmd.label;"
accesskey="&manBookmarksCmd.accesskey;"
oncommand="toOpenWindowByType('bookmarks:manager', 'chrome://browser/content/bookmarks/bookmarksManager.xul');"/>
<menuseparator/>
</menupopup>
</menu>
<menuitem label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
<menuitem id="menu_preferences"
label="&preferencesCmd.label;"
accesskey="&preferencesCmd.accesskey;"
oncommand="openPreferences();"/>
<menuitem label="&downloads.label;" accesskey="&downloads.accesskey;"
key="key_openDownloads" command="Tools:Downloads"/>
<menuitem label="&extensions.label;" accesskey="&extensions.accesskey;"
command="Tools:Extensions"/>
<menuitem label="&themes.label;" accesskey="&themes.accesskey;"
command="Tools:Themes"/>
</menupopup>
</menu>
</menubar>
|
The Bookmarks menu doesnt work properly (at least, it didn't for me)
And I've noticed some of my extensions arent working, nor are my Back/Forward/Stop buttons. Gonna take a bit of effort to get it working nicely I think.
Now that I think about it, maybe if you leave the File/Edit/etc menus in browser.xul and then just hide them in userChrome.css with display: none !important; then stuff might not break, since the menus are essentially still there. |
|
Back to top |
|
 |
anfpunk Apprentice

Joined: 29 May 2003 Posts: 275 Location: Columbus, Oh
|
Posted: Tue Jul 06, 2004 4:04 am Post subject: |
|
|
So basically just make everything one large menu and then hide it with css. I noticed when looking through the DOM inspector that each entry had functions in them. |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 4:10 am Post subject: |
|
|
anfpunk wrote: | So basically just make everything one large menu and then hide it with css. I noticed when looking through the DOM inspector that each entry had functions in them. |
Just leave everything in <menubar ...> ... </menubar>, and just add your "new" menu at the end. (ie. just before </menubar>)
Then you just go like this in userChrome.css
Code: |
menu[label="File"], menu[label="Go"], menu[label="Help"] {
display: none !important;
}
|
etc.. for all the menus except your new one. |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 4:11 am Post subject: |
|
|
Now please be quiet and stop distracting me, I really *must* do some work, or my head is going to be on the chopping block. I'll be around later to help you out  |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 4:46 am Post subject: |
|
|
Okay, okay, I couldn't help myself.
I've got everything working now, here it is.
Here is browser.jar
You put this file in /usr/lib/MozillaFirefox/chrome/
BUT, PLEASE backup your browser.jar first.
I know it works in Windows, I dont have access to Linux at work so if it doesnt work, sorry you'll have to wait till I get home
Now, this goes in <profiledir>/userChrome.css
Code: | menu[label="File"], menu[label="Edit"], menu[label="View"],
menu[label="Go"], menu[label="Tools"], menu[label="Help"],
menu[label="Bookmarks"] {
display: none !important;
} |
Start up Firefox, enjoy your new menu!
Happy hacking. |
|
Back to top |
|
 |
nagash- n00b

Joined: 07 Apr 2004 Posts: 24
|
Posted: Tue Jul 06, 2004 4:54 am Post subject: |
|
|
If anyone else would like me to make them a menu, or wants me to try and screw with anything else, just ask  |
|
Back to top |
|
 |
|