DEV Community

Basha
Basha

Posted on

How to make a simple chrome extension?

Hello:)
This is some instructions to make a simple chrome extension

Coding

First you will need to create a file called manifest.json
Then put this code in it

{
  "manifest_version": 3,
  "name": "",
  "version": "",
  "author": "",
  "description": "",

  "icons": {
    "128": "128.png"
  },
  "launch": {
    "web_url": "https://example.com"

  },
  "content_scripts":[
    {
      "matches": [
            "<all_urls>"
          ],
      "js": ["script.js"]
    }
Enter fullscreen mode Exit fullscreen mode

Then create the script.js
And write some code in it.
Example:

alert("extension");
Enter fullscreen mode Exit fullscreen mode

That all the code

view it

  1. Go to chrome://extension
  2. Toggle the developer mode
  3. Then click on pack extension then choose your extension folder. And that's it :) if you have any question feel freee to comment below

Top comments (0)