Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
3
Help us understand the problem. What is going on with this article?
@techno-tanoC

firefox でタブバーや URL バーを非表示にする

More than 1 year has passed since last update.

作ったものをアプリっぽい見た目にしたくなったので

  1. firefox -P で新しいプロファイルを作成して firefox -p ${profile_name} で起動
  2. url bar に about:config と入れて toolkit.legacyUserProfileCustomizations.stylesheetstrue にする
  3. url bar に about:profiles と入れて作ったプロファイルのディレクトリを開く。 linux なら ~/.mozilla/firefox/random.profile-name みたいなのになってるはず
  4. そこに chrome というディレクトリを作り以下のファイルを userChrome.css という名前で保存(内容は Firefox App Mode | Hummdis より)
  5. firefox -p ${profile_name} ${url}

linux 用

userChrome.css
/*
* Custom App Mode Settings for Firefox.
* This duplicates the effects of Chrome App mode.
*
*/
/* Hide the tabs bar. */
/* Hide solo tab */
#TabsToolbar {
    visibility: collapse !important;
}

/* Hide main toolbar contents EXCEPT Address bar */
#nav-bar toolbarbutton, #search-container, #stop-reload-button {
    display: none !important;
}
#nav-bar {
    min-height: 0px !important;
}

/* Hide Address bar when NOT focused (e.g., F6) */
#urlbar:not([focused]), #urlbar:not([focused]) * {
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

windows 用

userChrome.css
/*
* Custom App Mode Settings for Firefox.
* This duplicates the effects of Chrome App mode.
*
*/

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

/* Hide the Toolbars. */
#TabsToolbar,
#PersonalToolbar,
#BookmarksToolbar,
#MenuToolbar,
#tabbrowser-tabs {
    visibility: collapse !important;
}

/* Hide main toolbar contents EXCEPT Address bar */
/* leaves space for the window buttons */
#search-container,
#stop-reload-button {
    display: none !important;
}

#nav-bar {
    margin-top: -32px !important;
    margin-bottom: -4px !important;
}

/* Hide Address bar when NOT focused (e.g., F6) */
#urlbar:not([focused]),
#urlbar:not([focused]) * {
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

以下 gnome desktop でアプリにする方法

~/.local/share/applications 以下に .desktop ファイルを作る

sample.desktop
[Desktop Entry]
Name=Sample
Exec=firefox -P sample http://sample/
Terminal=false
Type=Application

参考

3
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
techno-tanoC
Elixir, Haskell, Ruby, Rustが好き
mixi
全ての人に心地よいつながりを

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
3
Help us understand the problem. What is going on with this article?