Recommended Posts

hey, i was wondering if any of you knew some good things i could add to these files?

Ive got some here.

to add these you have go go into mozillas application settings, an easier way would be to use this extension

Chromedit

"User.js"

// Turn off Automatic Image Resizing:

user_pref("browser.enable_automatic_image_resizing", false);

// Click on throbber to go to Google:

user_pref("browser.throbber.url", "http://www.google.com");

// Save history for 1 day

user_pref("browser.history_expire_days", 1);

"userchrome.css"

/* Remove stop button when there's nothing to stop */

#stop-button[disabled=true] { display: none; }

"userContent.css"

/* Change cursor for links that open in new window */

:link[target=_blank], :visited[target=_blank], :link[target=_new], :visited[target=_new] {cursor: crosshair;}

/* Make forms look nicer */

input,textarea {border: 1px inset ThreeDFace;} select {border-width: 1px !important;} input[type=radio], input[type=checkbox] {border: 1px inset ThreeDFace ! important;} button, input[type=reset],

input[type=button], input[type=submit] {padding: 1px 0 1px 0;border: 1px outset ButtonFace;}

if you have any more please share...

  ELeVeNtY said:

// Turn off Automatic Image Resizing:

user_pref("browser.enable_automatic_image_resizing", false);

// Save history for 1 day

user_pref("browser.history_expire_days", 1);

585101455[/snapback]

um, those settings are right in the options for Firefox already. No need to customize your user.js to make use of them.

  bangbang023 said:
um, those settings are right in the options for Firefox already. No need to customize your user.js to make use of them.

585101627[/snapback]

One benefit of setting options in user.js is that you can make a backup of that file if you have to recreate your profile.

well the difference between user and pref is that user always overwrite pref settings

I like to put all my stuff in user.js and even if the option is in options dialog of FX.

Because in user.js, I can add my lines and keep them the sort I want for better find

  finalcut said:
well the difference between user and pref is that user always overwrite pref settings

I like to put all my stuff in user.js and even if the option is in options dialog of FX.

Because in user.js, I can add my lines and keep them the sort I want for better find

585102827[/snapback]

Yeah, but something that exists already in prefs.js, by default, does not need to be added to the user.js. It's redundant.

  • 1 month later...
  bangbang023 said:
Yeah, but something that exists already in prefs.js, by default, does not need to be added to the user.js. It's redundant.

585102889[/snapback]

Not really, prefs.js gets filled by extensions' prefs, it's a lot easier to keep the settings you want in user.js and just delete prefs.js instead of editing the obsolete parts out. Of course this doesn't apply if one isn't interested in keeping the fox clean.. but since people seem to like programs like ccleaner..

  Elendil said:
Not really, prefs.js gets filled by extensions' prefs, it's a lot easier to keep the settings you want in user.js and just delete prefs.js instead of editing the obsolete parts out. Of course this doesn't apply if one isn't interested in keeping the fox clean.. but since people seem to like programs like ccleaner..

585361489[/snapback]

My whole argument was that some of the settings he is asking to put into user.js are readily available in the options dialog. It's not a hack or a secret. You cna easily edit it to whatever you want and the value will be stored in the usual file prefs.js automatically.

Clean? It's a lot messier when Fx is loading a variable's value twice.

user_pref("editor.singleLine.pasteNewlines", 3);

When you copy and paste any multi-line text into any single-line textbox (like the address bar), this pref will remove the carriage returns and make it into a single-line text:

e.g.,

copy

===

https://www.neowin.net/

forum/index.php?

showtopic=257301

=> paste

====

https://www.neowin.net/forum/index.php?showtopic=257301

Instead of adding and deleting to userContent.css you can create a file in your Profile/Chrome directory called "whatever.css" and fill it with all the hacks you want.

At the very top of userContent.css, add the line-

@import url("whatever.css");

useful for trying out various ad-blocking css'es.

  • 2 weeks later...

UserChrome.css

/* hide seperators between toolbars */

#toolbar-menubar {

min-height: 12px !important;

padding: 0px !important;

margin: 0px !important;

border: none !important;

}

#nav-bar {

border: none !important;

padding: 0px !important;

}

#PersonalToolbar {

border: none !important;

}

/*hide bookmark toolbar folder from bookmarks menu */

menu[label=Bookmarks Toolbar Folder] { display: none !important; }

anybody have anything else? I'm going to be adding a lot of these to part of my guide. maybe even re writing it since most people now know what firefox is.

Edited by supernova_00

Add the following to your userContent.css file to display a small icon next to web links that point to certain file types:

a[href^="mailto:"]:before {content: url("moz-icon://.EML?size=16")}
a[href$=".pdf"]:before {content: url("moz-icon://.PDF?size=16")}
a[href$=".exe"]:before {content: url("moz-icon://.EXE?size=16")}
a[href$=".doc"]:before {content: url("moz-icon://.DOC?size=16")}
a[href$=".xls"]:before {content: url("moz-icon://.XLS?size=16")}
a[href$=".zip"]:before {content: url("moz-icon://.ZIP?size=16")}

Looks like this:

post-30836-1102237574.gif

thanks em_te, do you know how to add icons for other things or what icons are include with firefox and moz builds by default? and can anybody add a bunch of tweaks...I want to rewrite my guide to include lots of common questions and answers and lots of tweaks. I'm pretty sure most know what features firefox has now and now need info on setting it up to there preference and tweak settings.

This will move your sidebar to the bottom of the window. (see attachment)

Add it to your userChrome.css file.

/* Move sidebar to bottom */

#browser {-moz-box-orient: vertical; -moz-box-direction: reverse}
#sidebar-box {-moz-box-orient: horizontal; -moz-box-direction: reverse}
#appcontent {-moz-box-orient: horizontal}
#sidebar {max-width: inherit !important; min-height: inherit !important}
#sidebar-box > sidebarheader {
  -moz-box-orient: vertical;
  -moz-box-direction: reverse;
  -moz-box-pack: end;
  border-left: 1px solid ThreeDHighlight;
  margin-left: 1px;
}
#sidebar-box .tabs-closebutton > .toolbarbutton-icon {padding: 4px 2px !important}
#sidebar-title {display: none}
#sidebar-throbber {margin-left: 4px}

(P.S.: if you use the MileWideBack extension, this conflicts with it.)

post-30836-1109891714.gif

  supernova_00 said:
thanks em_te, do you know how to add icons for other things or what icons are include with firefox and moz builds by default?

585563637[/snapback]

Those icons are Windows icons. Firefox has the ability to extract the icon from the OS. There's a general format for the CSS code:

a[href$=".XXX"]:before {content: url("moz-icon://.XXX?size=16")}

where XXX is the 3 letter file extension. I'm not sure if it is case sensitive though.

By the way I found this on the web a long time ago so credit goes to that person.

  Quote
"userchrome.css"

/* Remove stop button when there's nothing to stop */

#stop-button[disabled=true] { display: none; }

Brilliant Thanks

so......

then i tried adding the Forward and Back buttons to see what happened..

it works!!

so

"userchrome.css"

/* Remove Back button when there's nothing to go Back to */

#back-button[disabled=true] { display: none; }

/* Remove Forward button when there's nothing to go Forward to */

#forward-button[disabled=true] { display: none; }

I don't know what other things you could do this with, but for me this suffices

------------------------------------------------------------------------

  • 4 weeks later...

If you've used MSDN, you'll know that their website uses frames. And everytime you try to open a frame in it's own window, they have javascript there that puts it back into a frame. To stop that, add the following preferences to your "user.js" file:

user_pref("capability.policy.msdn.sites", "http://msdn.microsoft.com");
user_pref("capability.policy.msdn.Window.self", "noAccess");

  • 4 weeks later...
  ELeVeNtY said:
/* Remove stop button when there's nothing to stop */

#stop-button[disabled=true] { display: none; }

585101455[/snapback]

One problem with this is if you try to click the "stop" button just as the page stops loading, the "stop" button will disappear and you will end up hitting the home button. A better approach is to check if the mouse is over it, and if so, not to hide the button yet. i.e.,

#stop-button[disabled="true"] { display:none; } #stop-button[disabled="true"]:hover { display:-moz-box; }

If you want the Safari behavior and have only the "reload" button or the "stop" button visible at any one time, first customize your toolbar and move the "stop" button to the left of the "reload" button, and then use this in your userChrome.css file:

#stop-button[disabled="true"] { display:none; }
#stop-button:not([disabled]) + #reload-button { display:none; }

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

  • Recent Achievements

    • Week One Done
      SmileWorks Dental earned a badge
      Week One Done
    • Community Regular
      vZeroG went up a rank
      Community Regular
    • Collaborator
      Snake Doc earned a badge
      Collaborator
    • Week One Done
      Snake Doc earned a badge
      Week One Done
    • One Month Later
      Johnny Mrkvička earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      581
    2. 2
      ATLien_0
      200
    3. 3
      Michael Scrip
      199
    4. 4
      +FloatingFatMan
      129
    5. 5
      Xenon
      124
  • Tell a friend

    Love Neowin? Tell a friend!