2011/07/22

firefoxの調節

本気でfirefoxのみ生活を送り始めたのだが、そうなると細かいことが気になってくる。
  • タブバーの文字に比べて、ロケーションバーや検索バーのフォントが大きい
  • 右クリックのメニューが多すぎる
これらの設定は userChrome.css というファイルを作成することでカスタマイズできる。
この userChrome.css ファイル周りの設定についてメモを残しておく。

userChrome.css は以下の場所に置く。
ubuntu
/home/[ユーザー名]/.mozilla/firefox/[xxxxx].default/chrome/
Windows7
/Users/[ユーザー名]/AppData/Roaming/Mozilla/Firefox/Profiles/[xxxxx].default/chrome/
ubuntuはuserChrome-example.cssファイルが既にあるので上記のディレクトリが存在するが、Windows7は(私の場合は)なかった。その場合は勝手に作ればよい。
ちなみに [xxxxx] は任意の文字列。

userChrome.css の例は以下。

@charset "utf-8";
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#urlbar {
        font-size: 10pt !important;
} /* ロケーションバー */
#urlbar dropmarker {
        display: none !important;
} /* 履歴プルダウンの▼ */
#star-button {
        display: none !important;
} /* スター */
#urlbar *|input {
        ime-mode: inactive !important;
} /* ロケーションバーにフォーカスが移った時に IME OFF(Linux非対応)*/
.searchbar-textbox {
        font-size: 10pt !important;
} /* 検索バーのテキストボックス */
.search-go-button,.search-go-button-stack {
        display: none !important;
} /* 検索バーの中の虫眼鏡ボタン */
#back-button[disabled="true"] {
        display: none;
} /* 必要な時以外は戻るボタンを非表示 */
#forward-button[disabled="true"] {
        display: none;
} /* 必要な時以外は進むボタンを非表示 */
/*** CONTEST MENU ***/
/* WEB PAGE */
#context-back,
#context-forward,
#context-reload,
#context-stop,
#context-sep-stop,
#context-bookmarkpage,
#context-savepage,
#context-sendpage,
/* LINK */
/*#context-openlink,*/
/*#context-openlinkintab,*/
/*#context-sep-open,*/
#context-bookmarklink,
/*#context-savelink,*/
#context-sendlink,
/*#context-copylink,*/
/*#context-copyemail,*/
/*#context-sep-copylink,*/
/* IMAGE */
#context-viewimage,
#context-copyimage,
#context-copyimage-contents,
#context-sep-copyimage,
/*#context-seveimage,*/
#context-sendimage,
#context-setWallpaper,
#context-setDesktopBackground,
#context-blockimage,
#context-viewimageinfo,
#context-sep-viewbgimage,
#context-viewbgimage,
/* TEXT */
/*#context-undo,*/
/*#context-sep-undo,*/
/*#context-cut,*/
/*#context-copy,*/
/*#context-paste,*/
/*#context-delete,*/
/*#context-sep-paste,*/
#context-selectall,
#context-sep-selectall,
/*#context-searchselect,*/
#context-viewpartialsource-selection,
#context-keywordfield,
/* EXTRA */
#context-printpage,
#frame,
#frame-sep,
#context-viewpartialsource-mathml,
#context-sep-properties,
#context-viewsource,
#context-viewinfo,
#context-metadata,
#spell-add-dictionaries-main,
#spell-separator,
#spell-check-enabled
{
        display: none !important;
}

これで余分なものをほとんど全て消せると思う。

まだ右クリックメニュー余分なものがある場合は、add-on の設定で消せる。

唯一難しいのは Delicious Bookmarks だったが、
about:config の以下の項目を true にすると消せる。

extensions.ybookmarks@yahoo.contextmenu.hide

右クリックメニューを消した場合、ほとんどの機能は All-in-One Sidebar でカバーできるのだが、「ソースの表示」だけがカバーできない。
View Source With や View Source Chart, ソースをタブで表示という有名な add-on があるが、どれも右クリックメニューを使ってしまう。
いっそのこと、add-on を使わずに Firefox から直接外部エディタを呼び出してしまおう。

about:config の以下の項目を true にする。
view_source.editor.external

about:config の以下の項目に、 外部エディタへのパスを設定する。
view_source.editor.path

0 件のコメント:

コメントを投稿