0 Firefox も結構使いやすい
最近は新しいブラウザがもてはやされていますが、全てのブラウザを使ってきた上で、Firefox はかなり便利なブラウザだなと思っているので、開発者への感謝としてこの記事を書かせていただきます。 まだ使ったことが無い方は、ぜひ一度インストールして試してみてください。
Firefox: The fast, private browser that keeps you safe
The independent browser that has your back. Firefox blocks trackers, has a free built-in VPN, puts you in control of AI, and never sells your personal data.

1 設定を変更する
Cmd ⌘ + , で環境設定ページを開くことができます。初めは、デフォルトで使っているブラウザからデータをインポートするのが良いでしょう。その他、このページで好みの設定に変更してください。

2 便利な機能
以下に Firefox の便利な機能を簡単に列挙しました。そのうちいくつかについては、以降でより詳しく説明しています。
-
カスタマイズしやすいツールバー。ツールバー上で右クリックして「ツールバーをカスタマイズ」を選ぶと、次の画面が出てきます。ドラック&ドロップでアイコンを追加&削除できます。

-
サイドバー:以下の様々な情報へのアクセスが簡単になります。
- ブックマーク
- 閲覧履歴
- Synced tabs
Simple Tab Groups(拡張機能) タブをグループ化して整理できます。ウィンドウを閉じてもタブは保存されます。- AI Chatbot: 設定ページの
Firefox Labsにて、AI chatbotにチェックをつけてください。Show prompts on text selectをチェックすると、任意のサイトで選択した文字列を指定している言語モデルにすぐに投げることができます。
-
マルチアカウントコンテナ 同じサイトに異なるアカウントで同時にログインできます。例えば、一つのタブでは仕事用のアカウントを用いてあるサイトにログインし、もう一つのタブでは、私的なアカウントで同一のサイトにログインできます。
-
スクリーンショット: Cmd ⌘ + Shift ⇧ + S スクリーンショットの範囲を以下の四つの方法で選択できます。
- 自分で範囲を選択
- カーソルが乗っているページの一部を自動的に選択
- 見えている範囲全体を選択
- スクロールできる範囲全体を選択

-
Reader View: Opt ⌥ + Cmd ⌘ + R Webページの無駄を取り除き、読みやすさを向上させます。
-
デバイスの同期
-
userChrome.cssでブラウザの見た目をカスタマイズできます。
3 アドオン(拡張機能)
アドオンの組み合わせによっては予期しない動作が起こり得ます。この場合は、問題を起こしていそうなアドオンを一旦無効にし、再度 Firefox を起動し直すことで、どのアドオンが問題を起こしているかわかります。どのアドオンが衝突しているか分かったら、GitHub のリポジトリで問題を報告すると良いです。
3-1 生産性関連
Bitwarden Password Manager
At home, at work, or on the go, Bitwarden easily secures all your passwords, passkeys, and sensitive information.


Dark Reader
Dark mode for every website. Take care of your eyes, use dark theme for night and daily browsing.

Dark Reader は、ウェブサイトをダークモードで表示し、読みやすくします。Opt ⌥ + D で切り替え可能です。
Dark Reader は、Firefox の PDF には機能しません。なので次のアドオン doqment を使うか、下の Bookmarklet (ブックマークのリンク先として Javascript の関数を登録したもの) を使って対応することができます。ここで紹介する Bookmarklet は、普通の Web ページの場合はページ全体の色を反転し、PDF の場合は、PDF のみの色を反転します(2回実行すると元に戻ります)。PDFビューアーの背景のダークモードは 4 about:config 節を参照してください。
javascript:(function(){var L='style_combined',S='#viewerContainer>#viewer.pdfViewer>.page{filter:%20invert(93%)}',E=document.querySelector('style[id="'+L+'"]');if(E){E.disabled=!E.disabled}else{var%20css='html%20{-webkit-filter:%20invert(90%);-moz-filter:%20invert(100%);-o-filter:%20invert(100%);-ms-filter:%20invert(100%);%20}',head=document.getElementsByTagName('head')[0],style=document.createElement('style');if(!window.counter){window.counter=1}else{window.counter++;if(window.counter%2==0){css='html%20{-webkit-filter:%20invert(0%);-moz-filter:%20invert(0%);-o-filter:%20invert(0%);-ms-filter:%20invert(0%);%20}'}}style.type='text/css';style.id=L;style.innerHTML=document.querySelector('#viewerContainer>#viewer.pdfViewer')?S:css;head.appendChild(style)}})()doqment PDF Reader
Firefox's PDF Viewer optimised for sustained reading: change PDF colours, smart zoom and more.

doqment はPDF ビューアで PDF を見やすい色に変更できます。
この拡張機能を有効にして PDF を閲覧している際は後述の Zotero Connector を使うことができません。PDF 以外を開いている場合は問題ありません。
Duplicate Tab Shortcut
Press Alt+Shift+D to duplicate the current tab (Option+Shift+D on Mac).

Duplicate Tabs Shortcut を使用すると、Windows / Linux では Alt + Shift ⇧ + D、Mac では Opt ⌥ + Shift ⇧ + D のキーボードショートカットでタブを複製できます。
G App Launcher (Google™ Shortcuts)
Previously known as Google™ Shortcuts.Display all Google services as buttons or as a space-saving dropdown menu next to your address bar. Reach services like Gmail, Google Drive, Maps, Calendar, and many more in a single click from your browser.

G App Launcher は、Gmail、Google Drive、Google カレンダー、Google マップ、Google 翻訳など、すべての Google サービスへのショートカットを表示します。
Grammar and Spell Checker - LanguageTool
With this extension you can check text with the style and grammar checker LanguageTool. It finds many errors that a simple spell checker cannot detect, like mixing up there/their, a/an, or repeating a word.

Grammar and Spell Checker - LanguageTool は、ウェブ上のどこでもスペルや文法の問題をチェックします。
Keepa.com - Amazon Price Tracker
→ Price History charts → Price Drop and Availability Alerts → Over 7 billion tracked products → Supports Amazon .com, .co.uk, .de, .co.jp, .fr, .ca, .it, .es, .in, .mx., .br

Keepa.com - Amazon Price Tracker は、Amazon製品の価格履歴グラフを表示します。
Firefox Multi-Account Containers
Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs. Cookies are separated by container, allowing you to use the web with multiple accounts and integrate Mozilla VPN for an extra layer of privacy.

Multi-Account Containers を使用すると、同じウェブサイトで複数のアカウントを同時に使用できます。後述のSimple Tab Groupsと互換性があります。(このアドオンを使わなくてもコンテナの最低限の機能は使えるかもしれません。)
Open in Sidebar
Open a link in the sidebar.

Open in Sidebar を使用すると、サイドバーに別のウェブサイトを表示できます。デフォルトで開くページを登録したり[Cmd ⌘ + , -> Extensions & Themes -> Open in Sidebar -> Preferences]、この拡張機能をサイドバーで開くためのショートカットを登録すると便利です。登録方法は後述の項目 3-4 を参照してください。
同様のアドオンに Side View というものもありますが、これを使用すると YouTube Music のバックグラウンド再生ができなくなります。
Print Edit WE
Edit the contents of a web page prior to printing or saving. Elements in the web page can be edited, formatted, hidden or deleted. Unwanted content, such as adverts and sidebars, can easily be removed.

Print Edit WE を使用すると、プリントプレビューモードで Web ページのコンテンツを編集できます。例えば、広告の部分だけ削除してからプリントアウトすることが可能です。
Simple Tab Groups
Create, modify, and quickly change tab groups

Multi-Account Containers と互換性があり、それぞれのグループ内のタブをどのコンテナで開くか設定することもできます。この拡張機能をサイドバーで開くためのショートカットを登録すると便利です。登録方法は後述の項目 3-4 を参照してください。

Simple Translate
Quickly translate selected or typed text on web pages. Supports Google Translate and DeepL API.


SingleFile
Save an entire web page—including images and styling—as a single HTML file.

SingleFile は、CSS、画像、フォント、フレームなどを含めた完全なページを 1 つの HTML ファイルとして保存することを可能にします。アノテーションしてから保存したり、ページ全体だけでなく、選択した範囲だけを保存することも可能です。
Swift Selection Search
Swiftly access your search engines in a popup panel when you select text in a webpage. Context menu also included!

Swift Selection Search を使用すると、選択したテキストに対してポップアップが表示されるので、使いたい検索エンジンで検索できます。
Tabliss - New Tab
A beautiful New Tab page with many customisable backgrounds and widgets that does not require any permissions.

Unsplash がおすすめです。

Tampermonkey
Tampermonkey is the world's most popular userscript manager.

Tampermonkey は、ユーザーが独自の JavaScript を実行するための拡張機能です。既に他のユーザーによって作られた機能をインストールすることもできます。例えば、この tumpio / Endless Google は、Google の検索結果を、下方向に追加的に自動でロードしてくれるため、次のページのリンクを押す必要がなくなります。
Wappalyzer
Identify technologies on websites

Wappalyzer はウェブサイトで用いられている技術を表示します。
Zotero | Connectors

3-2 YouTube 関連
Enhancer for YouTube™
Take control of YouTube and boost your user experience!


Video Speed Controller
Speed up, slow down, advance and rewind any HTML5 video with quick shortcuts.

Video Speed Controller この拡張機能は動画の再生速度制御、スキップ機能、一時停止程度ですが、Enhancer for YouTube と異なり、YouTube だけでなく Amazon プライムなど、どんな動画でも簡単なショートカットキーで機能して便利です。ビデオの速度は細かく調整でき、2 倍速以上にすることも可能です。
YouTube Audio
Listen to YouTube and YouTube Music without downloading video. Audio-only playback saves battery and data, with background and lock-screen play, ad and telemetry blocking, segment skipping, loudness normalization, EQ, and audio download.

Youtube Audio を使用すると、YouTube ビデオの音声のみを再生でき、メモリの消費を抑えることができます。
YouTube™ Comment Translate
Translate YouTube comments with a single click using Google Translate. The target language is easily customizable and there's also a button to translate all comments automatically. YouTube's default translation button is hidden

YouTube™ Comment Translate を使うと、YouTube の各コメントの右上にアイコンが表示され、それを押すとコメントが翻訳されます。
広告ブロック: 次のセキュリティの項目にも載せていますが、以下のどちらでも YouTube の広告を消せます。
AdBlocker Ultimate
Completely remove ALL ads. No “acceptable” ads or whitelisted advertisers allowed. This free extensions also helps block trackers and malware.

uBlock Origin
Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory.

3-3 セキュリティ関連
AdBlocker Ultimate
Completely remove ALL ads. No “acceptable” ads or whitelisted advertisers allowed. This free extensions also helps block trackers and malware.

AdBlocker Ultimate は、すべての広告とトラッキングをウェブページから削除します。
CanvasBlocker
Alters some JS APIs to prevent fingerprinting.

CanvasBlocker は、ウェブサイトが Javascript API を使ってフィンガープリントするのを防ぐことができます。
ClearURLs
Automatically removes tracking parameters from URLs

Neat URL
Remove tracking parameters like utm_source and fbclid from URLs. Test any URL, add your own rules and see what was cleaned.

ClearURLs または Neat URL は URL から不要な情報を削除します。
前者は Simple tab groups と併用すると問題が発生します。(コンテナ上で開く新しいタブが複製される)
Cookie AutoDelete
Control your cookies! This WebExtension is inspired by Self Destructing Cookies. When a tab closes, any cookies not being used are automatically deleted. Keep the ones you trust (forever/until restart) while deleting the rest. Containers Supported

Cookie AutoDelete は、開いているブラウザタブで使用されなくなったときに自動的にCookieを削除します。
Decentraleyes
Protects you against tracking through "free", centralized, content delivery. It prevents a lot of requests from reaching networks like Google Hosted Libraries, and serves local files to keep sites from breaking. Complements regular content blockers.

Decentraleyes は、Google Hosted Libraries などからのリクエストを大幅に減らします。通常のコンテンツブロッカーを補完します。
Firefox Relay
Firefox Relay lets you generate email aliases that forward to your real inbox. Use it to hide your real email address and protect yourself from hackers and unwanted mail.

Firefox Relay によって、自分のメールアドレスに紐付いたエイリアスメールアドレスを作ることができます。エイリアスメールアドレスに送信されたメッセージは、自分のメールアドレスの受信トレイに転送されます。いつでも削除でき、自分のメールアドレスを公開せずに済みます。
10 Minutes Disposable email
Temporary disposable 10 minutes email address. Protect your email from spam, bots and phishing easy to use firefox addon.

10 minute mail は、10 分間だけ有効な一時的なメールアドレスを生成します。一時的に試してみたいサービスのサインアップに便利です。

uBlock Origin
Finally, an efficient wide-spectrum content blocker. Easy on CPU and memory.

uBlock Origin は、低メモリ使用量と高パフォーマンスを備えた広告ブロッカーです。
広告ブロッカーとして意外にも、任意のウェブサイトの任意の要素を表示させないように設定することができます。右クリックから Block element を選択して表示させたくない要素を選ぶことができます。
WebRTC Leak Shield
Disable WebRTC and prevent IP leak.


WebRTC は Web Real-Time Communication(Web リアルタイム通信)の略で、ブラウザ間で外部ソフトウェアやプラグインを必要とせずにインターネットを通じて音声やビデオ通信を直接行う技術です。ビデオ会議やリアルタイム通信には便利ですが、プライバシー上の問題として IP アドレスの漏洩も懸念されます。ブラウザで WebRTC を無効にすると、IP の漏洩を防ぐことができます。
3-4 アドオンショートカットの設定



4 about
about:config ではさまざまな細かい設定を変更できます。
about:config の項目はバージョンアップによって変更される場合があります。古いサイトにはすでに存在しない項目が挙げられている場合があります。
- まず、検索バーに
about:configと入力して Enter キーを押してください。 - 警告ページが表示されますが、そのままクリックして進めます。
-
PDFプレビューをダークテーマにするには以下の設定を
2に変更するpdfjs.viewerCssTheme 2 -
ピンチ機能を有効にするには、以下の設定を
trueに変更するbrowser.gesture.pinch.latched true -
ブックマークを新しいタブで開く
browser.tabs.loadBookmarksInTabs true -
全てのテキストボックスでスペルチェックが有効になるように設定する
layout.spellcheckDefault 2 -
最後のタブを閉じてもウィンドウは開いたままにする
browser.tabs.closeWindowWithLastTab false -
userChrome.cssの適用を許可するtoolkit.legacyUserProfileCustomizations.stylesheets true -
Compact viewを適用可能にするbrowser.compactmode.show true -
アドオンを全てのサイトで利用可能にする
extensions.webextensions.restrictedDomains (全部消す) -
フルスクリーンの遷移をスムーズにする
full-screen-api.macos-native-full-screen false full-screen-api.transition-duration.enter 0 0 full-screen-api.transition-duration.leave 0 0
他にも色々変更できますので、各自で調べてみてください。
5 セキュリティ設定
5-1 安全なインターネット接続
- VPN を使用する
- Cloudfareを有効にする
- ECH を有効にする
- WebRTC を無効にする
5-1-1 VPN
仮想プライベートネットワーク(VPN)は、IP アドレスを隠したり、インターネットトラフィックを暗号化したり、地域制限のあるコンテンツにアクセスできるなどのメリットがあります。
5-1-2 CloudflareでDoH(DNS-over-HTTPS)を有効にする
- Cmd ⌘ + , で環境設定ページにアクセスします。
- 「ネットワーク設定」までスクロールし、「設定...」をクリックします。
- 「DNS over HTTPS を有効にする」を選択し、プロバイダーとして「Cloudflare」or「NextDNS」を選択します。
- 「OK」をクリックしてタブを閉じます。
5-1-3 ECH(Encrypted Client Hello)を有効にする
- Firefox を開き、
about:configにアクセスします。 network.dnsを検索します。network.dns.echconfig.enabledをtrueに設定します。network.dns.http3_echconfig.enabledをtrueに設定します。
5-1-4 WebRTCを無効にする
WebRTC は Web リアルタイム通信の略で、ブラウザ間で外部ソフトウェアやプラグインを必要とせずにインターネットを通じて音声やビデオ通信を直接行う技術です。ビデオ会議やリアルタイム通信には便利ですが、プライバシー上の問題として IP アドレスの漏洩も懸念されます。ブラウザで WebRTC を無効にすると、IP の漏洩を防ぐことができます。
WebRTC を無効にする:
- Firefox を開き、
about:configにアクセスします。 media.peerconnection.enabledを検索し、falseに設定します。
WebRTC Leak Shield:この拡張機能を使用すると、上記の設定を簡単に切り替えることができます。
5-2 テスト
Cloudflare Browser Check をパスすると、以下のように表示されます。

6 コンパクトビューの設定
6-1 コンパクトツールバー
最新のバージョンでは、Compact view を適用可能にするために、まず検索バーに about:config と入力して進み、次の設定に変更してください。
browser.compactmode.show trueツールバー上で右クリックして「ツールバーをカスタマイズ」を選び、下の画像で左下の「Density」をクリックして「コンパクト」を選択します。

6-2 userChrome.css をカスタマイズする
userChrome.css を用いることで、ウィンドウの表示を自分の好みにカスタマイズできます。
-
まず、
userChrome.cssが適用されるように次の設定を変更します。- 検索バーに
about:configと入力して、Enter キーを押します。 - 警告ページが表示されますが、そのままクリックして進めます。
toolkit.legacyUserProfileCustomizations.stylesheetsを検索します。falseになっていたらtrueに変更します。
- 検索バーに
-
次に
chrome/userChrome.cssを作成します。-
まず以下のコードをターミナルで実行して、デスクトップ上に
chrome/userChrome.cssを作ります。mkdir ~/Desktop/chrome; cd ~/Desktop/chrome; touch userChrome.css -
下の
/* compact view settings */以降のコードをuserChrome.cssに貼り付けます。 -
Mac の場合、ファイルの場所が次のパスになるように配置します。
~/Library/Application\ Support/Firefox/Profiles/<****>.default-release/chrome/userChrome.css(<****> は 8桁の英数字です) サーチバーに aboutと入力すると下の画面が現れ、赤枠の部分の Show in Finder をクリックすると開くことができます。 
-
Firefox を再起動します。
-
1/* compact view settings */
2/* compact bookmarks popup panel in toolbar */
3#personal-bookmarks .bookmark-item,
4#bookmarksMenuPopup .bookmark-item { max-width: 210px !important; }
5
6/* compact "Show tabs from other devices" view in toolbar*/
7#PanelUI-remotetabs,
8#PanelUI-remotetabs-tabslist{
9 height: flex !important;
10 min-width: 100px !important;
11 max-width: 210px !important;
12}
13
14/* compact library panel view in toolbar */
15#appMenu-libraryView,
16#PanelUI-history,
17#PanelUI-bookmarks {
18 min-width: 210px !important;
19 max-width: 210px !important;
20 max-height: 400px !important;
21}
22
23/* compact extensions panel view in toolbar */
24#unified-extensions-panel panelview
25{
26 width: 210px !important;
27 max-height: 500px !important;
28}
29
30/* compact 3-bar icon panel view in toolbar */
31#appMenu-popup panelview,
32#PanelUI-fxa {
33 width: 210px !important;
34}
35
36/* compact alltabs button at top right corner */
37#allTabsMenu-allTabsView {
38 min-width: 100px !important;
39 max-width: 210px !important;
40}その他:
/* bring tabs below search bar */
#titlebar {
order: 1 !important;
}
/* remove maximum/minimum width restriction of sidebar */
#sidebar-box {
min-width: 0px !important;
max-width: none !important;
}以下のリンクには、さらに多くのカスタマイズがあります。
MrOtherGuy/firefox-csshacks
Collection of userstyles affecting the browser
Aris-t2/CustomCSSforFx
Custom CSS tweaks for Firefox
7 その他
- Firefox のキーボードショートカット
- Cmd ⌘ を押しながら、リンクをクリックすると必ず新しいタブでリンクを開きます。
8 最後に
以上、僕が使っている範囲で Firefox の紹介をしてみました。他にもいい機能などあればコメントで教えていただけると嬉しいです。 ちなみに、Firefox のアドオンとして紹介したもののなかには Chrome の拡張機能としても提供されているものもあるので、Chrome をよく使っている方は探してみてください。

