====== Firefox ======
===== Configuration =====
==== about:config ====
An obscured, but powerful, method of configuring Firefox. You can edit settings by entering ''about:config'' in the address bar. From there you can search for settings and edit them.
=== Bookmarks ===
In the 'New Bookmark' and 'Edit This Bookmark' menus that appear when you click the bookmark icon, there's a list of the most recently used folders in the 'Folder' drop-down. You can increase this by searching for ''browser.bookmarks.editDialog.maxRecentFolders'', and increasing or decreasing the number to suit.
=== Dark Mode ===
To tell websites that you prefer to view pages in dark mode (or...)
* Set ''ui.systemUsesDarkTheme'' to:
* ''0'' = light
* ''1'' = dark
* ''2'' = no preference
If you want your UI to be dark you need to use a theme.
=== Tracking ===
Removes tracking extensions on URLs, except for [[google]] stuff :/
* Set ''privacy.query_stripping.enabled'' to ''TRUE''.
Probably better alternative is to use a dedicated extension.
=== Updates ===
To disable automatic updates you now have to do it though ''about:config'' :/
* Set ''app.update.auto'' to ''FALSE''.
===== Tips'n'Tricks =====
==== Address Bar ====
You can narrow your searches by starting them with:
^ %%^%% | History | |
^ %%*%% | Bookmarks | A star, like the bookmark icon |
^ %%%%% | Tabs | |
^ %%#%% | Page titles | Think of [[markdown]] titles |
^ %%@%% | URLs | |
^ %%+%% | Tags, separate with spaces for multiple | Why isn't this %%#%% D: |
They're easy to forget, so I've added some [[memory]]-aid notes. There's a little add-on you can use to remind yourself: [[ffaddon>location-bar-characters]].
Also see the [[#Keywords|§Keywords]] section below.
==== Bookmarks ====
If you want to import bookmarks I've made some notes on the syntax of the special [[html]] file: [[file_kinds#bookmarks|file_kinds§bookmarks]].
Handy if you want to make the list by hand, or made a script to convert from different formats or whatever. Figuring this out so I can import bookmarks exported from [[mastodon]].
This same format also works in [[Chrome]] and other browsers.
==== Keyboard Shortcuts ====
^ Address bar | ''Ctrl+L'' |
^ Bookmark | ''Ctrl+D'' |
^ Jump to right-most tab | ''Alt+9'' |
^ Move tabs | ''Ctrl+Shift+PageUp|PageDown|Home|End'' |
==== Keywords ====
If you add //keywords// to your bookmarks, you can also go straight to those pages by typing the keyword.
You can also use these for [[duckduckgo#Bangs|bang]]-like searches by bookmarking a site's search page/results and using ''%s'' to indicate where search terms go. A shortcut to creating these is to open the search page you want a keyword associated with, and right-click o nthe search box and add the keyword that way.
==== Reader View ====
Reader View is a nice clean way to read stuff online. Makes a lot of news and writing sites actually tolerable. Strips out everything but the text and images. Especially great on mobile, as it will turn pages that aren't designed for a small screen into something comfortable to read in that format.
Some add-ons for enhancing reader view (that I'm yet to test 8-)):
* [[ffaddon>reader-view|Open in Reader View]] - right-click menu option.
* [[ffaddon>automatic-reader-view|Automatic Reader View]] - Always open particular sites in reader view.
* [[ffaddon>auto-reader-view|Auto Reader View]] - ``
==== RSS ====
Firefox has dropped support for [[RSS]], it doesn't even render feeds anymore. You can re-add support with plugins, plus add some other useful features:
* I use [[ffaddon>feed-preview]] to get the old RSS functions back. It renders previews of feeds, and puts an icon in the address bar when feeds are present. There are other add-ons that do the same thing.
* I use [[ffaddon>youtube-rss-finder]] to make it easier to get feed links for [[Youtube]]. Like Feed Preview, it puts an icon in the address bar.
==== Styling ====
As an alternative to add-ons like [[stylus]], you can simply add [[CSS]] rules to the file ''userContent.css''. It's slightly annoying in that you have to restart Firefox for it to reload the file, but you can use Stylus or the built-in developer tools (you can load files in the 'style editor' tab) to preview things. For styling Firefox itself you create a file called ''userChrome.css''.
NB: Currently userChrome is working fine, but userContent is not doing anything for me :(
=== Method ===
- Open ''about:config'' and turn ''toolkit.legacyUserProfileCustomizations.stylesheets'' to ''True''.
- Open your profile directory (for me it's ''~/.mozilla/firefox/[profile name]'') and create a directory called ''chrome'' if it doesn't exist.
- Inside ''chrome'' create a file called ''userContent.css''
- Add rules to this, enclosed within ''@-moz-document domain([url]) {}'' that references the site you wish to target.
* Instead of ''domain([url])'' you can use ''url'', ''regex'', etc. See: [[https://developer.mozilla.org/en-US/docs/Web/CSS/@document#Syntax|@document#Syntax]].
* For ''userChrome.css'' you don't need the ''@-moz-document'' stuff, just add the rules like normal.
=== Examples ===
== Hide useless search results ==
@-moz-document domain(duckduckgo.com) {
.result[data-domain="www.w3schools.com"] {
display:none;
}
}
=== See Also ===
* https://www.userchrome.org/
* https://old.reddit.com/r/FirefoxCSS
==== Sundry ====
* You can middle click on the reload page button (↻) to duplicate the current tab. Way easier than having to right-click on the tab and select it from the menu.
* You can select multiple tabs with ''Ctrl'' and ''Shift'' clicking like you would in other programs.
* Quickest way to see alternate stylesheets is ''Alt+v'' then ''y''.
===== Troubleshooting =====
==== Browser works, pages don't load ====
Sometimes after a crash Firefox will start-up just fine, but pages won't load. Deleting ''~/.cache/mozilla'' seems to fix it.
I ended up making an //alias// in my ''.bashrc'':
alias fix-firefox='rm -rf ~/.cache/mozilla/firefox'
===== See Also =====
* [[github>mozilla/readability]] - Standalone version of the reader mode.
{{tag>bash fixes software web-browser}}