Skip to content

Instantly share code, notes, and snippets.

View antoj2's full-sized avatar

Anton antoj2

  • Denmark
  • 13:42 (UTC +02:00)
View GitHub Profile
@antoj2
antoj2 / autoconfig-split-view-key.md
Last active April 3, 2026 16:35
Keybind to open split view in Firefox

This method uses a relatively hidden feature of Firefox, called autoconfig, or more commonly userChrome.js. From what I understand it's primarily intended for enterprises to set certain preferences, disable changing certain preferences, hide UI elements etc. it's all documented here: https://support.mozilla.org/en-US/kb/customizing-firefox-using-autoconfig.

It can however, also be used to our advantage to run JavaScript code at startup, that can change the user interface, like the tab bar or context menu, and in this case, add keybinds and custom commands!

To set it up you first need to create a file, with the name autoconfig.js in either C:\Program Files\Mozilla Firefox\defaults\pref\ or /Applications/Firefox.app/Contents/Resources/defaults/pref/, depending on your operating system.

Contents:

pref("general.config.filename", "firefox.cfg");
pref("general.config.obscure_value", 0);