More Fun with Firefox
Here's another cool file, chrome://global/content/xul.css, which I discovered with a hex editor and put into the URI window. This one also turned out to be located inside the file
Here's some of what I found in the file xul.css:
/** this should only contain XUL dialog and document window widget
defaults. Defaults for widgets of a particular application should be
in that application's style sheet. For example style definitions for
navigator can be found in navigator.css
THIS FILE IS LOCKED DOWN. YOU ARE NOT ALLOWED TO MODIFY IT WITHOUT
FIRST HAVING YOUR CHANGES REVIEWED BY email@example.com
/* set default namespace to XUL */
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for
HTML elements */
@namespace xbl url("http://www.mozilla.org/xbl"); /* namespace for XBL
/* hide the content and destroy the frame */
/* hide the content, but don't destroy the frames */
:: Rules for 'hiding' portions of the chrome for special
:: kinds of windows (not JUST browser windows) with toolbars
(End of snippet of this file)
Here's a little bit about how to read this file. Anything that appears between /* and */ is a comment. Comments are notes a programmer writes to explain his or her source code to a human. The computer ignores comments when it runs a program.
Does that stuff about "THIS FILE IS LOCKED DOWN" intimidate you? Heh, heh, what if you were to change it yourself? I dare you! You would have to stick it back into the Java .jar file. Would it then run, or is there some way Firefox could detect that you changed it? Don't email me asking what would happen. You're a hacker, right? Try it
Well, what is stopping you from changing this program? It's located on your own hard drive, and Firefox is free for anyone to change, according to what it says about being a GNU licensed program on the "about:" page.
Robin Sheats adds that I was in error in an earlier version of this Guide when I called it a Java program.
"It's a CSS file. Anyone with a reasonable amount of
web CSS programming should be able to make some headway in understanding the
contents of this file. However, it doesn't style HTML, it styles XUL. XUL is
an XML-based user-interface language. That's how all the user interface stuff
in Firefox and Mozilla are written, and it's what makes it easy to do things
like write plugins, too.
"If anyone is curious, this is what Java looks like (from an open source Java
program I wrote): (Click here for the link)
"I would also like to see more uses of XUL out there, it's a really good idea.
For those who don't know, XUL is basically a user-interface language. XUL
code describes a user interface like HTML describes a page (in fact, from a
distance they actually look somewhat similar). You tie that in with
the user just has to go to a URL. A great demo is this :http://www.faser.net/mab/chrome/content/mab.xul (will only work in Firefox, and probably Mozilla. Duh :)
"Finally, the easiest way to mess with firefox settings is to simply
type 'about:config' into the URI bar. It gives you a huge list of settings.
Be aware that changing some of these may make firefox behave badly, so
remember what you changed and what they were originally in case you need to
change them back."
Carolyn again here: Be sure to have no spaces in "about:config" or it won't work. If you double click on a config item you get a box that allows you to type in soemthing different. You get more options if you right click: copy name, copy value, new (which in turn gives the options of string, integer or Boolen, eithert modify or toggle -- and for those of use who really mess up Firefox playing with about:config -- reset!
OK, now we can finally discuss how to find those .png files and alter them. The best one of them all is the Firefox brand image itself. You see it at the top of the page when you type about: in the URI window. However, finding where it is stored is not so simple. Normally you can find the location of an image by right clicking on it and choosing "view image." In the case of the Firefox brand image, this doesn't work. However, by poking around the page source for the about: page, I found that the page called up the image with the command "chrome://branding/content/about.png". I placed this inside the URI window and then did a view page source command. This revealed that the Firefox brand image, too, is stored inside /chrome/toolkit.jar.
How You Can Become a Mozilla Volunteer Programmer
Are you ready for the big time? If you can program in C or Java, and if you love to discover and fix bugs, or to write new features, you can submit your changes to Firefox to the Mozilla team. You can read about how to work with them at http://www.mozilla.org/developer/
Where are those back issues of GTMHHs? Check out the official Happy Hacker Web page at http://www.happyhacker.org.
We are against computer crime. We support good, old-fashioned hacking of the kind that led to the creation of the Internet and a new era of freedom of information. But we hate computer crime. So don't email us about any crimes you may have committed or may want to commit!
Back to the Guides to
(mostly) Harmless Hacking --->>