4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【2023年版】Firefoxのブックマークバーを複数行にする方法

Last updated at Posted at 2023-04-10

※ 昔懐かし「Multirow Bookmarks Toolbar」を彷彿とさせますね!
※ 「Multirow Bookmarks Toolbar」は Firefox の仕様変更で動作しなくなって消えてしまいました・・・便利だったのに!

  • 最新の Firefox をインストールします。
  • Firefox のアドレスバーに「about:config」と入力してENTERを押します。以下の警告が出るので「危険を承知の上で使用する」をクリックします。

image.png

  • 「設定名を検索」欄に「toolkit.legacyUserProfileCustomizations.stylesheets」と入力すると以下のように表示されるので「false」の部分をダブルクリックして「true」にします。

image.png

  • 別のタブでアドレスバーに「about:support」と入力してENTER。「プロファイルフォルダー」欄の「フォルダーを開く」ボタンをクリックします。

image.png

  • C:\Users\user\AppData\Roaming\Mozilla\Firefox\Profiles\XXXXXXXX.default-release みたいなフォルダがエクスプローラーで開きます。

  • 上記フォルダーの下に新しく「chrome」というフォルダーを作成します。

  • 上記「chrome」フォルダーを開いて、その中に「userChrome.css」という名前のテキストを作成します。(フォルダ内の空白部分を右クリックして、「新規作成」⇒「テキストドキュメント」とした後、名前を変更)

  • 「userChrome.css」を右クリックして「編集」(Windows11の場合は、右クリックして「その他のオプションを表示」⇒「編集」)でメモ帳が開くので、以下のテキスト(出典)を入力して保存。

userChrome.css
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/multi-row_bookmarks.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */

/* Makes bookmarks toolbar span multiple rows */

#PersonalToolbar{
  --multirow-bmb-n-rows: 3; /* Control how many rows are shown before scrolling */
  --multirow-bmb-row-margin: 2px; /* Control how much spacing is between rows */
  max-height: none !important;
}

#PlacesToolbar > hbox:not(#PlacesToolbarDropIndicatorHolder){ 
  display: block;
  width: 100vw;
}

#PlacesToolbarItems{
  display: flex;
  flex-wrap: wrap;
  /* --uc-bm-padding is defined in autohide_bookmarks_toolbar.css */
  max-height: calc(var(--multirow-bmb-n-rows) * (4px + 1em + (2 * (var(--multirow-bmb-row-margin) + var(--uc-bm-padding,var(--bookmark-block-padding)))))) !important;
  overflow-y:auto;
  scrollbar-color: var(--lwt-accent-color) var(--toolbar-bgcolor);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

/* Hide the all-bookmarks button */
#PlacesChevron{ display: none }

/* Add some spacing between rows */
#PlacesToolbarItems > .bookmark-item{
  margin: var(--multirow-bmb-row-margin) 3px !important;
  visibility: visible !important; /* Just in case they would be hidden for some reason */
}
  • Firefox を再起動後、ブックマークバーが表示されてなければ「Ctrl-Shift-B」を押して表示します。
  • ブックマークが少ない時は1行しか表示されませんが、ブックマークの数を増やして溢れさせればブックマークバーが2行、3行と下に広がります。また3行以上になった場合はスクロールバーが表示されてマウスのホイールでスクロールできます。

image.png

最後に

「userChrome.css」内の以下の行の「3」を「5」に変えれば、ブックマークバーが5行まで表示されるようになります。
「userChrome.css」を変更して保存したら、Firefox を再起動すると変更が適用されます。

--multirow-bmb-n-rows: 3; /* Control how many rows are shown before scrolling */

お試しあれ!それでは!

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?