userChromeJS / autoconfig.js and extensions
Video running installation steps below: https://youtu.be/_4fdUdp3G4o
Download this zip file and extract its content to Firefox installation folder (usually C:\Program Files\Mozilla Firefox).
Click Firefox menu button (☰) -> Help -> More troubleshooting information or simply open about:support. Find "Profile Folder", then click "Open folder". In there, create a new folder called chrome.
Download one of the files below and extract its content in chrome folder.
Now, if you're only interested in extensions, you can skip to step 6.
Save the desired userChromeJS scripts into chrome. Read below the description of some of them.
If you want a button to manage your scripts, including the ability to disable/enable scripts without needing to restart¹ Firefox or Thunderbird, save rebuild_userChrome.uc.js into chrome.
Open about:support and click "Clear startup cache…" to force Firefox to load userChromeJS on the next startup.
¹: Not all scripts are restartless. These have
@shutdownat the beginning of the code. Almost all scripts on this page were written by me to be restartless, but almost all scripts you get from other sources are not.
ᵀᴮ: also compatible with Thunderbird
(click to expand)
Besides that, no more than one tab should play audio at the same time. Each tab paused by another tab that starts playing is added to a stack. So if I open a new YouTube video while there's already one playing, the new tab starts playing and the other is paused. When the video ends or when I pause it, the first YouTube tab resumes playing.
As for now, I only added support for a few sites, like Deezer, Spotify and YouTube. I chose not to support next/previous in YouTube, only play/pause.
I don't like this. Firefox should be smart to always prioritize the page with higher "visit score" in browser history. That's what this script fixes. It preselects the first suggestion from address bar. For instance, if this page is the first suggestion when you type "xiaoxiaoflood", you don't need to press down arrow key before Enter.
Pages you usually visit will always rise to the first position, so accessing any frequent page will be as easy as typing no more than three chars + Enter, like just "you" + Enter to load YouTube Feed directly instead of YouTube homepage. It's even possible to teach Firefox to selects YouTube Feed with "y" and YouTube Homepage with "yo", it's just a matter of practice.
This script replaces urlbar autocomplete, so
browser.urlbar.autoFillis disabled on install. If at any time you miss domain autofill, you still sort of can achieve that by pressing Tab IF the domain of first suggestion matches what you've typed so far. Example: you typed "git" and the first suggestion is from github.com. Pressing Tab key will autocomplete the domain even if the first suggestion is not just github.com - it may be github.com/whatever. But if the typed input doesn't match the domain of the first suggestion, then Tab key will have default behavior of selecting next suggestion just like down arrow key.
ignoreListif you are deliberately using an outdated version of an extension and don't want to be notified that an update is available.
You need to set a master password in Firefox Options > Privacy & Security > [×] Use a Primary Password.
Left-click to minimize (so I can't close it accidentally).
Right-click to close.
Middleclick restores to fixed position/size (edit script code with your preferred values). If you want to restore to previous position/size, use Shift + Middleclick.
GESTURES:). Some of them:
Gestures are cumulative if possible, so right-click (hold) + left-click + left-click + left-click will toggle between the two most recently used tabs.
Advantages over existing extensions: - Extensions can't run over Firefox interface, so gestures don't work over Firefox toolbars. - Extensions can't run on privileged pages like about:config and view-source. - Extensions need the page to start loading to run, causing gestures to fail sometimes. - Extensions can't set gestures for 4th and 5th mouse buttons (Back and Forward). - UserChromeJS has unlimited power, so you can do almost whatever you want if you write code for that. For example, I have a gesture that forces an extension (Tiled Tab Groups) to execute part of its own code that is not exposed to other addons by an API.
New tabs (Ctrl+T or New Tab button) inherits the container of current tab (except for Private Tabs).
The label in urlbar serves as menubutton to reopen current tab in other container. With left click, current tab is replaced. With middleclick, a new tab is opened without closing the other one.
The main difference between this and extensions like Redirector it that these Firefox extensions record both pre-redirect and final URLs in history. I want it to record just the final URL.
This script can also do more complex things like running a JS function with regex results.
Finally, the main reason why I wrote this was to integrate it with Link Status Redux. When I point the mouse to a link that I've already visited, LSR displays the time of last visit. This is extremely useful for me to know if I have already visited the page and to track changes since last visit.
LSR uses Redirector rules to replace links directly in page (Redirector extension doesn't do this, it redirects only when you try to load the URL). And many URLs have gibberish at the end, so I have rules to remove them, then the URL remains clean and LST can track last visit correctly (because the gibberish is different every time, generating different URLs).
Note: the list of rules in the script is just an example, mine is much bigger.
Screenshots (yes, I'm using the old Stylish icon):
about:config. Using this preference, you can set whatever you like as your New Tab page, including things like
file://URLs that don't work with new tab override extensions. Once you install the script, just set the preference in
about:configand it should work automatically. Make sure you don't have any other new tab extensions, or it might not work.
(Written by TheRealPSV)
about:configis way worse than the classic page. Although the new version was introduced in Fx 71, the old one was still accessible for a while via direct URL, but it was removed in Fx 87. To continue using it, save all three files from the link below, then bookmark the following URL: