DEV Community


Posted on • Originally published at Medium on

Create your own chrome extension — and deploy to Chrome Web Store

Create your own chrome extension — and deploy to Chrome Web Store

Github Readme Markdown

Web Extensions


First of all, I’ll tell you it is very easy. There is only one important file, that is —  manifest.json. Everything there is to know about this file —

_// Required_
 "[**manifest\_version**](": 2,
 "[**name**](": "My Extension",
 "[**version**](": "versionString",

_// Recommended_
 "[**default\_locale**](": "en",
 "[**description**](": "A plain text description",
 "[**icons**](": {...},

_// Pick one (or none)_
 "[**browser\_action**](": {...},
 "[**page\_action**](": {...},

_// Optional_
 "action": ...,
 "author": ...,
 "automation": ...,
 "[**background**](": {
_// Recommended_
 "[**persistent**](": false,
_// Optional_
 "[**chrome\_settings\_overrides**](": {...},
 "[**chrome\_ui\_overrides**](": {
 "bookmarks\_ui": {
 "remove\_bookmark\_shortcut": true,
 "remove\_button": true
 "[**chrome\_url\_overrides**](": {...},
 "[**commands**](": {...},
 "content\_capabilities": ...,
 "[**content\_scripts**](": [{...}],
 "[**content\_security\_policy**](": "policyString",
 "converted\_from\_user\_script": ...,
 "current\_locale": ...,
 "declarative\_net\_request": ...,
 "[**devtools\_page**](": "devtools.html",
 "[**event\_rules**](": [{...}],
 "[**externally\_connectable**](": {
 "matches": ["\*://\*\*"]
 "[**file\_browser\_handlers**](": [...],
 "[**file\_system\_provider\_capabilities**](": {
 "configurable": true,
 "multiple\_mounts": true,
 "source": "network"
 "[**homepage\_url**](": "http://path/to/homepage",
 "[**import**](": [{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}],
 "[**incognito**](": "spanning, split, or not\_allowed",
 "input\_components": ...,
 "[**key**](": "publicKey",
 "[**minimum\_chrome\_version**](": "versionString",
 "[**nacl\_modules**](": [...],
 "oauth2": ...,
 "[**offline\_enabled**](": true,
 "[**omnibox**](": {
 "keyword": "aString"
 "[**optional\_permissions**](": ["tabs"],
 "[**options\_page**](": "options.html",
 "[**options\_ui**](": {
 "chrome\_style": true,
 "page": "options.html"
 "[**permissions**](": ["tabs"],
 "platforms": ...,
 "replacement\_web\_app": ...,
 "[**requirements**](": {...},
 "[**sandbox**](": [...],
 "[**short\_name**](": "Short Name",
 "signature": ...,
 "spellcheck": ...,
 "[**storage**](": {
 "managed\_schema": "schema.json"
 "system\_indicator": ...,
 "[**tts\_engine**](": {...},
 "[**update\_url**](": "http://path/to/updateInfo.xml",
 "[**version\_name**](": "aString",
 "[**web\_accessible\_resources**](": [...]

At least we know, there is nothing more than this. Now while making an extension, we don’t need to use every code written above.

Now we’re gonna make the Github Readme Markdown Chrome Extension whose link I gave in the beginning.

( Go have a look at it. )

Step 1: Creating a manifest.json file


“manifest\_version”: 2,

“author”: “",

“name”: “Github Readme Markdown”,

“icons”: { “48”: “./demo.png”, “128”: “./demo.png” },

“version”: “1.0”,

“description”: “Show options, how to edit while is being edited in browser”,

“content\_scripts”: [


“matches”: [


“js”: [“showoption.js”],

“run\_at”: “document\_end”




In this, we can specify author that will be you, the name of the extension, It’s icons , i.e how it will be displayed. the basic description which will be shown, when you publish the app to the store.

In matches attribute, we specify the URL, with some regular expression and when this URL matches, it will run the showoption.js file

Step 2: Creating showoption_.js file_

buttton = document.createElement(“button”);

buttton.innerHTML = “See Markup”;

buttton.setAttribute(“type”, “button”);



“flex-item-equal nav-link flex-md-auto preview tabnav-tab js-blob-edit-preview js-blob-edit-tab”


buttton.setAttribute(“data-togggle”, “popover”);

buttton.setAttribute(“title”, “Headings\n# The largest heading\n## The second largest heading\n######“ );

var a = document.querySelector(“.tabnav”);

if (a == undefined || null) {

} else {



That’s it. You have your extension.!!!!!! :)

Testing —

  1. Visit chrome://extensions/
  2. Click on Load Unpacked button and select the folder in which those 2 files are present.
  3. And there you are. Just See if it works.

Publishing —

  1. Visit Chrome Developer Dashboard
  2. You’ll have to pay 5$, one time fees, to upload up to 20 packages on Google Web Store.
  3. After Paying you can publish your extension by following the simple procedure and uploading a .zip file for your extension.

If you like my content, do give it a few claps. I would appreciate it.

Top comments (0)