If you have used a browser extension such as userChrome.js in the past to run JavaScript code in the browser context; handy to manipulate functionality of the browser directly.
A huge list of scripts was created that Firefox users could load using the extension. These scripts changed elements of the Firefox user interface, dialogs, and other features of the browser.
The release of Firefox 57 blocks extensions like userChrome.js. Someone figured out how to restore the functionality in Firefox 57 and newer versions.
It needs to be noted that Mozilla may plug this hole at any time, and that scripts may stop working because of that eventually.
Here is how it works
Download the three userChrome.* files from the project’s GitHub repository and place them in the chrome folder of the Firefox profile.
If you make use of some of these files already in the folder copy the content of them and paste them to add them to your files in the folder.
You can open the profile folder of Firefox by loading about:support in the browser’s address bar. There you find the “open folder” button which you need to activate to open the Firefox profile folder using the default file manager of the system. If the chrome folder does not exist (it does not by default), create it, and place the files in the folder afterwards.
The author describes how the workaround works on the project page:
It relies on the fact that post-57 Firefox still allows a custom userChrome.css file, and a Firefox-specific CSS hack which can bind javascript to arbitrary DOM elements. I picked (somewhat at random) a DOM element in the browser whose existing XBL binding didn’t already have a <constructor> tag, and added some JS there to load an external javascript file.
It’s very possible that at some future time the Firefox team will remove some or all of the functionality that makes this possible, so enjoy it while you can.
You need to add what you want to executed to the userChrome.js file. You may want to check out this Firefox 57 scripts repository, all of which should work with Firefox 57 and newer versions of the browser.
Read also: YouTube’s improved Blur Faces tool launches
Simply copy the code from any script and restart Firefox afterwards. The script is run then by Firefox.