To provide the FocusFinder User Style to Firefox users that do not have the Stylish or Stylus browser extension, I want to create a simple Firefox extension that just applies these CSS rules. How easy is this with the new WebExtensions API model? Well…
Very easy!
- Create your CSS and provide it as User Style.
- Create the extension skeleton using the First Example from the Add-ons topic on MDN docs as Template.
- Replace the javascript file from the example with the file obtained via “Install style as userscript” on the user style website.
- Try the extension out locally using the Firefox debugging mode.
- Package it as a simple ZIP file.
- Publish to addons.mozilla.org (AMO), by submitting it through the submission form.
- Enjoy!
Here is the Focus Finder Firefox Extension on the official Firefox Add-ons Page!
Resources
- Firefox Browser Extension overview
- For publishing your add-on, see Signing and distributing your add-on.
- This extension quite exactly fits the outline of the First WebExtension Example.