How to build your first Chrome Extension in 5 minutes

How to build your first Chrome Extension in 5 minutes

The Chrome web browser is very extensible. It seems like there is a plugin for just about everything you could ever possibly want. Have you ever wanted to create your own Chrome extension? Have you ever wondered how difficult the process would be? Well, it turns out it is a lot easier than you ever imagined.

The Chrome web browser is very extensible. It seems like there is a plugin for just about everything you could ever possibly want.

Have you ever wanted to create your own Chrome extension? Have you ever wondered how difficult the process would be? Well, it turns out it is a lot easier than you ever imagined.

Image for post

What is a Chrome Extension?

A Chrome extension is just some HTML, CSS, and JavaScript that allows you to add some functionality into the Chrome browser through some APIs.

Let’s get started!

Create the Project

Image for post

Photo by Max Duzij on Unsplash

The first thing we need to do is create the project and all the files we need for our extension. Let’s start by creating a new directory that we’ll call “Demo Extension”. Chrome allows us to load up a plugin by pointing it at a folder that contains the extension files.

All Chrome extensions require a manifest file. This manifest file tells everything to the chrome it needs to know to properly load up in the chrome.

Create the Manifest

Let’s create the manifest.json file inside the project directory. This serves a similar purpose as package.json , providing every important information.

Here’s an example:

manifest.json

Let’s discuss each term.

Developers should specify which version of the manifest specification their package targets by setting a manifest_version key in their manifests.

Current Version:

{
  ...,
  "manifest_version": 2,
  ...
}
  • Manifest version 1 was deprecated in Chrome 18 and onwards!
  • **name** and **description** can be anything you’d like.
  • **version** is your chrome extension version.
  • **short_name** is a short version of the app’s name. It is an optional field.
  • **name** and**short_name** are identifiers of the app.
  • The **permissions** depend on what the extension needs to do.

A list of all **permissions**can be found in chrome’s extension docs. I would suggest giving it a read.

web-development javascript software-development chrome programming

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Offshore Software Development - Best Practices

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development.

Software Developer vs Web Developer | Difference Web Developer & Software Developer

Software Developer vs Web Developer | Difference Web Developer & Software Developer | Software development and web development are normally used interchangeably. Although both include development, a software developer has different responsibilities from that of a web developer.

5 Core Criteria for Selecting Software Development Company - TopDevelopers.co

Check out these five criteria for the selection of your software vendor, and you will never regret having the wrong quality product made for you.

Developer Career Path: To Become a Team Lead or Stay a Developer?

For a developer, becoming a team leader can be a trap or open up opportunities for creating software. Two years ago, when I was a developer, ... by Oleg Sklyarov, Fullstack Developer at Skyeng company

Software Developer vs Software Engineer — Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What you’re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and let’s dispute! So, today’s topic…