Most of us spend a lot of time inside a web browser. If you’re a Chrome, Firefox, or Edge user, then you’ll know these browsers come with a huge number of third-party extensions to augment the features already built into the software.
But what if you need some kind of specific extra functionality, some tool or feature that’s not covered by existing add-ons? Then it might be time to consider writing your own browser extension. That might sound daunting, but It’s not that difficult to do once you learn how. And once you’ve created a custom extension, you can either keep it for your own private use or make it public so anyone can use it.
Some coding knowledge is required, so you’ll need to learn the basics of how web pages and scripts are written if you don’t already know them. If you’re a beginner, you can start small and work your way up. There are also a lot of helpful resources out there on the web if you need them, everything from code libraries to online courses.
A browser extension typically consists of several components: the manifest file, which contains information about the extension; the background script, which runs in the background; and the content script, which interacts with web pages. You can use a plain text editor or an IDE like Visual Studio Code or IntelliJ IDEA to write your code.
When you’re finished building your extension, you can start testing it out locally on your own computer. If everything looks good, you can package your extension into a .crx file and distribute it to the Chrome Web Store. This requires registering a Google developer account, which costs $5 and lets you submit up to 20 different extensions.
Once you’ve submitted your extension, Google will review it to make sure it’s safe and does what it says it does. After approval, you can publish your extension and start sharing it with others.
Source: https://www.wired.com/story/how-to-write-your-own-browser-extension/