2024-10-31

Firefox

A Comprehensive Guide to Firefox

Table of Contents

0. Firefox is Quite User-Friendly

While new browsers are constantly being hyped, after using all available browsers, I find Firefox to be quite convenient. I'm writing this article as a thank you to the developers. If you haven't tried it yet, please install it and give it a try.
Firefox Screenshot

1. Changing Settings

You can open the preferences page with Cmd ⌘ + ,. Initially, it's good to import data from the browser you're currently using. You can also adjust other settings to your preference on this page.
Settings Screenshot

2. Useful Features

Below is a simple list of Firefox's useful features. Some of these are explained in more detail later.
  1. Rich extensions (add-ons)
  2. Easily customizable toolbar. Right-click on the toolbar and select "Customize Toolbar" to see the following screen. You can add and remove icons using drag and drop.
    Toolbar Customization
  3. Sidebar: Provides easy access to various information:
    • Bookmarks
    • Browsing history
    • Synced tabs
    • Simple Tab Groups (extension) You can group and organize tabs. Tabs are saved even when you close the window.
    • AI Chatbot: Check AI chatbot in the Firefox Labs section of the settings page. If you check Show prompts on text select, you can immediately send selected text to your specified language model on any site.
      AI Chatbot
  4. Multi-Account Containers You can log in to the same site with different accounts simultaneously. For example, in one tab, you can log in to a site with your work account, and in another tab, you can log in to the same site with your personal account.
  5. Screenshots: Cmd ⌘ + Shift ⇧ + S You can select the range of screenshots in four ways:
    • Select the range yourself
    • Automatically select part of the page where the cursor is
    • Select the entire visible range
    • Select the entire scrollable range
      Screenshot Tool
  6. Reader View: Opt ⌥ + Cmd ⌘ + R Removes unnecessary elements from web pages and improves readability.
  7. Device synchronization
  8. Customize the browser's appearance with userChrome.css.

3. Add-ons (Extensions)

Warning
Certain combinations of add-ons may cause unexpected behavior. In such cases, temporarily disable the suspected add-on, restart Firefox, and see which add-on is causing the issue. Once you identify which add-ons are conflicting, it's good to report the issue on the GitHub repository.

favicon
Bitwarden is a free, convenient open-source password manager. To use this extension, you need to install the desktop app.
image.png

favicon
Dark Reader displays websites in dark mode, making them easier to read. You can toggle it with Opt ⌥ + D.
Note
Dark Reader doesn't work on Firefox's PDF viewer. You can use the doqment add-on mentioned next or use the following Bookmarklet (JavaScript function registered as a bookmark link). This Bookmarklet inverts colors for regular web pages and just inverts the PDF colors when viewing PDFs (run it twice to revert). For dark mode background in the PDF viewer, see section 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)}})()

favicon
doqment can change the PDF color to make it easier to view in the PDF viewer.
Warning
When this extension is enabled while viewing PDFs, you cannot use the Zotero Connector mentioned later. There is no issue when viewing non-PDF content.

favicon
With Duplicate Tabs Shortcut, you can duplicate tabs using the keyboard shortcut Alt + Shift ⇧ + D on Windows/Linux or Opt ⌥ + Shift ⇧ + D on Mac.

favicon
G App Launcher displays shortcuts to all Google services, such as Gmail, Google Drive, Google Calendar, Google Maps, Google Translate, and more.

favicon
Grammar and Spell Checker - LanguageTool checks for spelling and grammar issues anywhere on the web.

favicon
Keepa.com - Amazon Price Tracker displays price history graphs for Amazon products.

favicon
Multi-Account Containers allows you to use multiple accounts on the same website simultaneously. It is compatible with Simple Tab Groups mentioned later. (You might be able to use the minimal container functionality without this add-on.)

favicon
Open in Sidebar allows you to display another website in the sidebar. It's convenient to register default pages to open [Cmd ⌘ + , -> Extensions & Themes -> Open in Sidebar -> Preferences] and register a shortcut to open this extension in the sidebar. See item 3-4 below for registration methods.
Warning
There is a similar add-on called Side View, but using it prevents YouTube Music from playing in the background.

favicon
Print Edit WE allows you to edit web page content in print preview mode. For example, you can remove ad sections before printing.

favicon
Simple Tab Groups is possibly the most useful add-on. It allows you to group and organize tabs. You can quickly switch between groups, preventing you from getting lost among many tabs. Groups and their tabs are also retained when you close the browser. It's also compatible with Multi-Account Containers, and you can set which container to open tabs in for each group. It's convenient to register a shortcut to open this extension in the sidebar. See item 3-4 below for registration methods.
SCR-20240503-edyg.png

favicon
Simple Translate is a simple and lightweight translation tool. It translates selected text and displays it in a popup window. To translate to your preferred language, change the "target language" in the settings screen.
SCR-20230624-oicn.png

favicon
SingleFile allows you to save a complete page as a single HTML file, including CSS, images, fonts, frames, etc. You can annotate before saving and save not just the entire page but also just a selected area.

favicon
Swift Selection Search displays a popup for selected text, allowing you to search using your preferred search engine.

favicon
Tabliss is a new tab extension with beautiful backgrounds and multiple widgets. Unsplash is recommended for backgrounds.
SCR-20230624-oilx.png

favicon
Tampermonkey is an extension that allows users to run their own JavaScript. You can also install features already created by other users. For example, tumpio / Endless Google automatically loads Google search results downward, eliminating the need to click the next page link.

favicon
Wappalyzer displays the technologies used on websites.

favicon
Zotero Connector automatically detects content in your web browser and allows you to add it to your Zotero library with one click. The Zotero app itself is very helpful for literature management.
zotero-connector.png

favicon
Enhancer for YouTube adds many useful features to YouTube, including video playback speed control, cinema mode, screenshots, and more. You can fine-tune video speed in intervals of 0.05 from (0.01, 0.02, 0.05, 0.1, 0.2, 0.25, 0.5, 1) and go beyond 2x speed.
image.png

favicon
Video Speed Controller offers video playback speed control, skip functions, and pause capabilities, but unlike Enhancer for YouTube, it works on any video, not just YouTube, including Amazon Prime, with simple keyboard shortcuts. Video speed can be finely adjusted and set to more than 2x.

favicon
Youtube Audio allows you to play only the audio of YouTube videos, reducing memory consumption.

favicon
YouTube™ Comment Translate displays an icon in the top right of each YouTube comment, which when clicked translates the comment.
Ad Blockers: As mentioned in the next security section, either of the following can remove YouTube ads:

favicon

favicon

favicon
AdBlocker Ultimate removes all ads and tracking from web pages.

favicon
CanvasBlocker can prevent websites from fingerprinting using the Javascript API.

favicon

favicon
ClearURLs or Neat URL removes unnecessary information from URLs.
Warning
The former may cause issues when used with Simple Tab Groups (duplicating new tabs opened in containers).

favicon
Cookie AutoDelete automatically deletes cookies when they are no longer used by open browser tabs.

favicon
Decentraleyes significantly reduces requests from sources like Google Hosted Libraries. It complements regular content blockers.

favicon
Firefox Relay allows you to create alias email addresses linked to your email address. Messages sent to the alias email address are forwarded to your inbox. You can delete them at any time, avoiding the need to share your actual email address.

favicon
10 minute mail generates a temporary email address valid for only 10 minutes. It's useful for signing up for services you just want to try temporarily.

favicon
Flagfox displays a country flag in the search bar indicating the location of the current website's server.

favicon
Privacy Badger automatically blocks invisible trackers.

favicon
uBlock Origin is an ad blocker with low memory usage and high performance. Surprisingly, as an ad blocker, it can be set to hide any element on any website. You can select elements you don't want to display by right-clicking and selecting Block element.

favicon
WebRTC Leak Shield prevents WebRTC leaks.
Note
WebRTC stands for Web Real-Time Communication and is a technology that allows direct voice and video communication between browsers over the internet without requiring external software or plugins. While convenient for video conferences and real-time communication, there are privacy concerns about IP address leakage. Disabling WebRTC in your browser can prevent IP leakage.

3-4. Setting Add-on Shortcuts

SCR-20230624-lyil.png
Untitled.png
SCR-20230624-lyxa-2.png

4. about

about:config allows you to change various detailed settings.
Warning
The about:config items may change with version updates. Older sites may list items that no longer exist.
  1. First, type about:config in the search bar and press Enter.
  2. A warning page will appear, but proceed by clicking through.
  • To set PDF preview to dark theme, change the following setting to 2
    pdfjs.viewerCssTheme    2
  • To enable pinch functionality, change the following setting to true
    browser.gesture.pinch.latched    true
  • Open bookmarks in a new tab
    browser.tabs.loadBookmarksInTabs    true
  • Enable spell checking in all text boxes
    layout.spellcheckDefault    2
  • Keep the window open even when the last tab is closed
    browser.tabs.closeWindowWithLastTab    false
  • Allow applying userChrome.css
    toolkit.legacyUserProfileCustomizations.stylesheets    true
  • Make Compact view applicable
    browser.compactmode.show    true
  • Make add-ons available on all sites
    extensions.webextensions.restrictedDomains (delete all)
  • Make fullscreen transitions smooth
    full-screen-api.macos-native-full-screen	false
    full-screen-api.transition-duration.enter	0 0
    full-screen-api.transition-duration.leave	0 0
There are many other settings you can change, so feel free to explore.

5. Security Settings

5-1. Secure Internet Connection

  • Use a VPN
  • Enable Cloudflare
  • Enable ECH
  • Disable WebRTC
Reference: Firefox Privacy - ArchWiki

5-1-1. VPN

A Virtual Private Network (VPN) offers benefits such as hiding your IP address, encrypting internet traffic, and accessing region-restricted content.

5-1-2. Enable DoH (DNS-over-HTTPS) with Cloudflare

  1. Access the preferences page with Cmd ⌘ + ,.
  2. Scroll down to "Network Settings" and click "Settings...".
  3. Select "Enable DNS over HTTPS" and choose "Cloudflare" or "NextDNS" as the provider.
  4. Click "OK" to close the tab.

5-1-3. Enable ECH (Encrypted Client Hello)

  1. Open Firefox and access about:config.
  2. Search for network.dns.
  3. Set network.dns.echconfig.enabled to true.
  4. Set network.dns.http3_echconfig.enabled to true.

5-1-4. Disable WebRTC

Note
WebRTC stands for Web Real-Time Communication and is a technology that allows direct voice and video communication between browsers over the internet without requiring external software or plugins. While convenient for video conferences and real-time communication, there are privacy concerns about IP address leakage. Disabling WebRTC in your browser can prevent IP leakage.
To disable WebRTC:
  1. Open Firefox and access about:config.
  2. Search for media.peerconnection.enabled and set it to false.
WebRTC Leak Shield: This extension allows you to easily toggle the above setting.

5-2. Testing

When you pass the Cloudflare Browser Check, it will be displayed as follows:
Untitled.png

6. Compact View Settings

6-1. Compact Toolbar

In the latest version, to enable Compact view, first type about:config in the search bar and proceed, then change the following setting:
browser.compactmode.show    true
Right-click on the toolbar and select "Customize Toolbar", then click "Density" in the bottom left of the image below and select "Compact".
screenshot.png

6-2. Customize userChrome.css

You can customize the window display to your liking using userChrome.css.
  1. First, change the following setting to allow userChrome.css to be applied:
    1. Type about:config in the search bar and press Enter.
    2. A warning page will appear, but proceed by clicking through.
    3. Search for toolkit.legacyUserProfileCustomizations.stylesheets.
    4. If it's set to false, change it to true.
  2. Next, create chrome/userChrome.css:
    1. First, run the following code in the terminal to create chrome/userChrome.css on your desktop:
      mkdir ~/Desktop/chrome; cd ~/Desktop/chrome; touch userChrome.css
    2. Paste the code following /* compact view settings */ below into userChrome.css.
    3. For Mac, place the file at the following path: ~/Library/Application\ Support/Firefox/Profiles/<****>.default-release/chrome/userChrome.css (<****> is an 8-digit alphanumeric string) You can access this by typing about in the search bar and clicking "Show in Finder" in the red box area shown below:
      screenshot.png
    4. Restart Firefox.
/* compact view settings */
/* compact bookmarks popup panel in toolbar */
#personal-bookmarks .bookmark-item,
#bookmarksMenuPopup .bookmark-item { max-width: 210px !important; }

/* compact "Show tabs from other devices" view in toolbar*/
#PanelUI-remotetabs,
#PanelUI-remotetabs-tabslist{
  height: flex !important;
  min-width: 100px !important;
  max-width: 210px !important;
}

/* compact library panel view in toolbar */
#appMenu-libraryView,
#PanelUI-history,
#PanelUI-bookmarks {
  min-width: 210px !important;
  max-width: 210px !important;
  max-height: 400px !important;
}

/* compact extensions panel view in toolbar */
#unified-extensions-panel panelview
{
  width: 210px !important;
  max-height: 500px !important;
}

/* compact 3-bar icon panel view in toolbar */
#appMenu-popup panelview,
#PanelUI-fxa {
  width: 210px !important;
}

/* compact alltabs button at top right corner */
#allTabsMenu-allTabsView {
  min-width: 100px !important;
  max-width: 210px !important;
}
Other options:
/* 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;
}
The following links have even more customizations:

favicon

favicon

7. Other Tips

8. Conclusion

Above, I've introduced Firefox based on my personal experience. If you know of other good features, please let me know in the comments. By the way, many of the Firefox add-ons introduced here are also available as Chrome extensions, so if you often use Chrome, feel free to look for them.