Quantcast
Channel: Blog of Jason Grimme - Programming and All Things Jason » Mozilla
Viewing all articles
Browse latest Browse all 3

Firefox – Removing the Star ‘Bookmark This Page’ button

$
0
0

For some reason with the release of Firefox 3, Mozilla decided to add a star icon in the location bar that allows you to bookmark the current page. I click on this so-called feature all the time by accident while trying to get to the location bar history dropdown menu. Eventually I decided I had to figure out how to get rid of this pesky feature.

The suspect

Because Mozilla is awesome, the interface of Firefox is all written in XUL (XML) and CSS, which makes it relatively easy to modify.  The first step is to identify the element you want to modify.  You can parse the DOM yourself or you can use the DOM Inspector addon that ships with Firefox.  The  node that contains the bookmark button is appropriately named/ID star-button.  To hide this noede, all you have to do is set the display  none.

  1. Find the location of your Firefox profile.  In Windows 7 mine was in C:\Users\Jason\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxx.default\.  The xxxxxxx.default part is a randomly generated string, so it will be different for you.    In Windows XP the Appdata folder is in C:\Documents and Settings\Jason\Application Data\.
  2. Navigate to your Chrome directory
  3. There should be an example userChrome css file called userChrome-example.css.  Save the example as userChrome.css If  you already have a userChrome.css file, use that instead.
  4. Add the following CSS rule:
    1
    2
    3
    4
    /* Edit: Removes the bookmark this page button. */
    #star-button {
        display: none !important;
    }
  5. Save this file again and then restart Firefox.  The star button will be gone!

The result of your userChrome.css file should like like the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
 * Edit this file and copy it as userChrome.css into your
 * profile-directory/chrome/
 */


/*
 * This file can be used to customize the look of Mozilla's user interface
 * You should consider using !important on rules which you want to
 * override default settings.
 */


/*
 * Do not remove the @namespace line -- it's required for correct functioning
 */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */


/* Edit: Removes the bookmark this page button. */
#star-button {
    display: none !important;
}

/*
 * Some possible accessibility enhancements:
 */

/*
 * Make all the default font sizes 20 pt:
 *
 * * {
 *   font-size: 20pt !important
 * }
 */

/*
 * Make menu items in particular 15 pt instead of the default size:
 *
 * menupopup > * {
 *   font-size: 15pt !important
 * }
 */

/*
 * Give the Location (URL) Bar a fixed-width font
 *
 * #urlbar {
 *    font-family: monospace !important;
 * }
 */


/*
 * For more examples see http://www.mozilla.org/unix/customizing.html
 */

Viewing all articles
Browse latest Browse all 3

Trending Articles