Last Updated: February 16, 2016

How to create google chrome extension in 3 simple steps?

Description: In this post I'm gonna show you 3 simple steps to create your own google chrome extension.You can simply follow the steps with tips and note listed in between the post.

So lets get started.




Step 1: Create a folder namely('chrome_extension_demo') with 4 files in it index.html, main.js, manifest.json & extension.css.

Step 2: Lets add code into above files.
Tip: you can simply open the folder in any editor like(Sublime or Notepad++ for ease to write code)

  • index.html(contains our basic html code with few buttons on it)

<html>
<head>
 <title>Code2Concept extension demo</title>
 <script src="main.js"></script>
 <link rel="stylesheet" type="text/css" href="extension.css">
</head>
<body background="bg.png">
 <h1 align="center" id="code2concept"><a href=""><font color="white">Code2Concept</font></a></h1>
 <center>
  <div class="buttonContainer">
   <div>
    <button id="home" class="button">Home</button>
    <br/>
    <br/>
   </div>
   <div >
    <button id="twitter" class="button">Twitter</button>
    <br/>
    <br/>
   </div>
   <div>
    <button id="my_linkedin" class="button">My LinkedIn</button>
    <br/>
    <br/>
   </div>
   <div>
    <button id="stackoverflow" class="button">Stackoverflow</button>
    <br/>
   </div>
  </div>
  <hr/>
  <h5> <font color="white">This is the demo to create google chrome extension.</font></h5>
 </center>
</body>
</html>



  • manifest.json(simple json file which is needed by chrome to add extension)
{
  "manifest_version": 2,

  "name": "Code2Concept extension demo",
  "description": "This is the Code2Concept extension to demostrate chrome extension",
  "version": "1.0",

  "background":{
  "scripts": ["main.js"]
  },
  
  "browser_action": {
   "default_icon": "icon.png",
   "default_popup": "index.html"
  },
  "permissions": [
   "activeTab"
   ]
}

  • main.js(javascript code to add listener to our buttons)
document.addEventListener('DOMContentLoaded', function() {

 //home
  var home = document.getElementById('home');
  home.addEventListener('click', function() { 
    openUrl('http://bit.ly/1LqS9ku');
  }, false);

   //twitter
  var twitter = document.getElementById('twitter');
  twitter.addEventListener('click', function(){
    openUrl('http://bit.ly/20XuV1K');
  }, false)

  //stackoverflow.
  var stackoverflow = document.getElementById('stackoverflow');
  stackoverflow.addEventListener('click', function(){
   openUrl('http://bit.ly/1olt4D5');
  }, false)

//my linkedIn public dir.
  var my_linkedin = document.getElementById('my_linkedin');
  my_linkedin.addEventListener('click', function(){
   openUrl('http://bit.ly/1Tn6BBJ');
  }, false)


  //open url function in new tab
  function openUrl(newURL) {
    chrome.tabs.create({ url: newURL});
  }

}, false);



  • extension.css(css for buttons)
.button {
 border: 1px solid #13cbbb;
    border-radius: 3px;
    color: #FFFFFF;
    display: inline-block;
    float: center;
    font-size: 12px;
    margin-right: 3.2%;
    background-color: #13cbbb;
    padding: 7px 4.0%;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}
.button:hover {
 background-color:#13cbbb;
 opacity: 0.7;
}
.button:active {
 position:relative;
 top:1px;
}

.buttonContainer{
    width: 160px;
}

Note: You can download bg.png from here  and  icon.png  from here and place in the folder created in step 1:




Step 3: The most important step is how to add our code in chrome browser. Open chrome settings from hamburger icon on the right of  browser. Settings --> extensions --> load unpacked extension(select your folder created instep 1) --> fig.1


Chrome extension code2concept

Finally you'll see the your extension add to the chrome as shown in fig.2.
Chrome extension
fig.2

  • If you find some issue implementing simply download and follow step 3.

  • To upload on chrome web store go here since we have developed this into developer mode.

Bingo!!! you have created your first chrome extension successfully.

107 comments :

  1. Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! Buy Pinterest Followers

    ReplyDelete
  2. I recently came across your blog and read along. I thought I would leave my first comment. I don’t know what to say except what I’ve enjoyed reading. Great blog I will be visiting this blog very easily. Buy Negative Google Reviews

    ReplyDelete
  3. hi, your site is fantastic. I truly do many thanks for operate web design new york

    ReplyDelete
  4. This is very interesting, You are a very professional blogger. I’ve joined your rss feed and look ahead to in search of more of your wonderful post. Also, I’ve shared your website in my social networks! new york web designs

    ReplyDelete
  5. Amaze! Thank you! I constantly wished to produce in my internet site a thing like that. Can I take element of the publish to my blog? san francisco brand agency

    ReplyDelete
  6. The Texas Transportation Institute has estimated the cost of traffic congestion at USD 87.2 billion in wasted fuel and lost productivity. artificial intelligence courses in hyderabad

    ReplyDelete
  7. Step-by-Step create website Easy to Customize, Publish Now! Custom domain name. Multiple payment methods. Free multilingual fonts. 24/7 support center. 1000s of free images. Top industry hosting. 100s of Apps. Easy-to-add blog. Mobile optimized. Create Website

    ReplyDelete
  8. Hey, great blog, but I don’t understand how to add your site in my reader. Can you Help me please?
    Tropic Diva

    ReplyDelete
  9. You have done a great job. I will definitely dig it and personally recommend to my friends. I am confident they will be benefited from this site.
    Tropic Diva

    ReplyDelete
  10. This program is viewed as a serious application however it is helpless against getting defiled or harmed. Clients have vouched for seeing many Chrome blunder messages. Brighter Guide homepage

    ReplyDelete
  11. Hey, great blog, but I don’t understand how to add your site in my reader. Can you Help me please?
    bandar slot terpercaya

    ReplyDelete
  12. When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style. cfa pdf

    ReplyDelete
  13. I recently found many useful information in your website especially this blog page. Among the lots of comments on your articles. Thanks for sharing. BUY GOOGLE REVIEWS

    ReplyDelete
  14. Great article! Among the lots of comments on your articles. Thanks for sharing.
    Get Facebook reviews

    ReplyDelete
  15. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. google meet extension

    ReplyDelete
  16. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work https://hostinglelo.in/

    ReplyDelete
  17. Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also google ads tricks

    ReplyDelete
  18. I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... agencje rekrutacyjne it

    ReplyDelete
  19. Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. buy google reviews

    ReplyDelete
  20. Discovering pictures to remember for your digital book is simpler than any time in recent memory with a straightforward public domain search by means of Google since it's pressed brimming with them!
    https://onohosting.com/

    ReplyDelete
  21. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. dark web links

    ReplyDelete
  22. office cleaning edinburgh I precisely needed to thank you so much yet again. I do not know the things I would’ve taken care of without these secrets contributed by you regarding this problem. It seemed to be a very frightful crisis for me, but encountering a new well-written tactic you processed it forced me to jump with contentment. Now i am happier for the work and hope you are aware of an amazing job you happen to be getting into educating people through your web blog. Probably you haven’t come across any of us.

    ReplyDelete
  23. lezaalava I precisely needed to thank you so much yet again. I do not know the things I would’ve taken care of without these secrets contributed by you regarding this problem. It seemed to be a very frightful crisis for me, but encountering a new well-written tactic you processed it forced me to jump with contentment. Now i am happier for the work and hope you are aware of an amazing job you happen to be getting into educating people through your web blog. Probably you haven’t come across any of us.

    ReplyDelete
  24. back pain I’m not that much of a internet reader to be honest but your blogs really nice, keep it up! I’ll go ahead and bookmark your site to come back in the future. All the best

    ReplyDelete
  25. Home depot health check I precisely needed to thank you so much yet again. I do not know the things I would’ve taken care of without these secrets contributed by you regarding this problem. It seemed to be a very frightful crisis for me, but encountering a new well-written tactic you processed it forced me to jump with contentment. Now i am happier for the work and hope you are aware of an amazing job you happen to be getting into educating people through your web blog. Probably you haven’t come across any of us.

    ReplyDelete
  26. online casino real money I precisely needed to thank you so much yet again. I do not know the things I would’ve taken care of without these secrets contributed by you regarding this problem. It seemed to be a very frightful crisis for me, but encountering a new well-written tactic you processed it forced me to jump with contentment. Now i am happier for the work and hope you are aware of an amazing job you happen to be getting into educating people through your web blog. Probably you haven’t come across any of us.

    ReplyDelete
  27. online casino real money canada His or her shape of unrealistic tats were initially threatening. Lindsay utilized gun first basic, whereas this girl snuck outside by printer ink dog pen. I used absolutely sure the all truly on the shade, with the tattoo can be taken from the body shape. make an own temporary tattoo

    ReplyDelete
  28. I read your article , your content is well and I like it Thank you For this.Buy Verified PayPal Account

    ReplyDelete
  29. Wow awesome blog post. Really thank you! Fantastic.
    instagram photo downloader

    ReplyDelete
  30. Buy Verified PayPal Account PayPal is the main means of transferring money worldwide. You can quickly transfer money from one place to another in a very short time. No problem. PayPal account is one of the most popular business in the world. PayPal is a very popular means of payment system. People become helpless without PayPal. PayPal has given the opportunity to transact money from one place to another all over the world. PayPal is a very popular payment system that allows you to easily transfer money from one place to another.

    ReplyDelete
  31. I precisely needed to thank you so much yet again. I do not know the things I would’ve taken care of without these secrets contributed by you regarding this problem. It seemed to be a very frightful crisis for me, but encountering a new well-written tactic you processed it forced me to jump with contentment. Now i am happier for the work and hope you are aware of an amazing job you happen to be getting into educating people through your web blog. Probably you haven’t come across any of us. covens in maryland

    ReplyDelete
  32. I precisely needed to thank you so much yet again. I do not know the things I would’ve taken care of without these secrets contributed by you regarding this problem. It seemed to be a very frightful crisis for me, but encountering a new well-written tactic you processed it forced me to jump with contentment. Now i am happier for the work and hope you are aware of an amazing job you happen to be getting into educating people through your web blog. Probably you haven’t come across any of us. เธšเธฒเธ„เธฒเธฃ่เธฒ

    ReplyDelete
  33. Choose from our great range of the finest Kilt Jackets. Browse our collection of Evening, Day and Argyll Kilt Jackets. Buy your Kilt Jacket online now.Utility kilts

    ReplyDelete
  34. Good job on this article! I really like how you presented your facts and how you made it interesting and easy to understand. Thank you. เธ„เธฒเธชิเน‚เธ™

    ReplyDelete
  35. https://www.coderconsole.com/2016/02/how-to-create-google-chrome-extension.html

    ReplyDelete
  36. I read your article.very good and informative content.thanks for itKilt for sale

    ReplyDelete
  37. Nice to be visiting your blog once more, it continues to be months for me. Nicely this post that i’ve been waited for so lengthy. I want this article to total my assignment in the university, and it has same topic together with your post. Thanks, terrific share. baccarat

    ReplyDelete
  38. Shop incredible deals at Element ะฒะตะนะฟะพะฒะต, a progressive online retail establishment serving the vaping community with mod kits



    ReplyDelete
  39. The number one retail store of hold fragrances in Pakistan, stockpiling a strong brand portfolio such as Chanel, Dior, John Ford, and Paco Rabanne.alfaris perfume price in pakistan

    ReplyDelete
  40. Couvreur 95 c'est une Entreprise familiale depuis 30 ans, spรฉcialiste des couvertures toitures.Nous connaissons tous les types de toitures et notre expรฉrience fait de nous une rรฉfรฉrence dans le mรฉtier.

    ReplyDelete
  41. I read your essay and found it to be well-written and interesting. Thank you for this.Buy Verified PayPal Account

    ReplyDelete
  42. Your essay was well-written and entertaining, and I liked reading it. Thank you once again.Buy Verified PayPal Account

    ReplyDelete
  43. I read your post and found it to be well-written and interesting.Buy Verified PayPal Accounts

    ReplyDelete
  44. Couvreur Marseille, c'est un artisan depuis plus de 30 ans avec une extrรชme attention et un savoir-faire que vous retrouver uniquement avec un Couvreur Zingueur expรฉrimentรฉ comme lui.beautour patrice

    ReplyDelete
  45. I read all of your articles on your website and found them to be extremely interesting. Thank you for sharing.Rak money exchange

    ReplyDelete
  46. Exceptional article, This website's content is filled with optimism and motivation. It makes me happy to read it. You're doing a fantastic job. Thank you very much.Gali result

    ReplyDelete
  47. My interest was peaked by all of your entries on your website, so I read them all. I appreciate you sharing this information. Buy Verified PayPal Account

    ReplyDelete
  48. I have read all of your website's articles. I find this to be really educational. I appreciate you sharing.Buy Google 5 Start Reviews

    ReplyDelete
  49. I’m going to read this. I’ll be sure to come back. thanks for sharing. Buy SendGrid Account
    Buy SendGrid Accounts We are providing 100% verified premium SendGrid Account at the cheapest rate. Along with we give. https://usaloqal.com/product/buy-sendgrid-accounts/

    ReplyDelete
    Replies
    1. Good work pleace . https://usaloqal.com/product/buy-sendgrid-accounts/

      Delete
  50. You made some excellent points here. Amazing stuff I believe you brought up some excellent points. Continue your wonderful work.Online Quran teaching

    ReplyDelete
  51. All of your entries on your website caught my attention, and I read them all. Thank you for providing this information.Buy Verified Binance Account

    ReplyDelete
  52. I'm very glad I found this article. It was very distinctive. like the book a lot. The pictures are great. You might find more like it. Definitely read your blogs. Buy Verified Paxful Account

    ReplyDelete
  53. Check out NFT_GuruCreator's NFTs on OpenSea, the largest marketplace for crypto collectibles.cheap NFT in opensea

    ReplyDelete
  54. This post is excellent and fascinating. I appreciate you sharing this insightful knowledge. Buy Verified Binance Account

    ReplyDelete
  55. Buy Verified PayPal Accounts Most of the famous payment methods in the world today are PayPal . We are offers Fully USA, UK, Canadian Verified. Buy Verified PayPal Accounts

    ReplyDelete
  56. Buy Verified PayPal Account. Buy USA, UK, CA, AUS phone number and Bank verified and Credit Card verified Cheap Old PayPal account. No limit.
    https://smmseomarket.com/product/buy-verified-paypal-account/

    ReplyDelete
  57. Buy Google Reviews. USA, UK, CA Buy Positive Google Reviews. Buy Google 5 Star rating are fully depended upon the customers Verified Profile.Buy Google Reviews

    ReplyDelete
  58. Buy Verified Paxful Account. Buy UK, USA, CA, AUS phone number and Bank verified and Credit Card verified Paxful account. 100% Verified.Buy Verified Paxful Account

    ReplyDelete
  59. Buy Verified PayPal Accounts. USA, UK, CA phone number and Bank verified and Card and Passport verified PayPal account. 100% No Limit.Buy Verified PayPal Accounts

    ReplyDelete
  60. Buy Verified PayPal Accounts. Buy USA, UK, CA Verified PayPal Accounts, High quality verified personal & Business Accounts. 100% No limit.Buy Verified PayPal Accounts

    ReplyDelete
  61. Buy Verified PayPal Accounts. Buy USA, UK, CA Verified PayPal Accounts, High quality verified personal & Business Accounts. 100% No limit. Buy Verified PayPal Accounts

    ReplyDelete
  62. Buy Verified PayPal Accounts. Buy USA, UK, CA Verified PayPal Accounts, High quality verified personal & Business Accounts. 100% No limit.Buy Verified PayPal Accounts

    ReplyDelete
  63. Buy Facebook Ads Accounts. USA, UK, CA Buy Verified Facebook Business Managers. Buy Facebook 5 Ads Creat and BM With Verified Profile.Buy Facebook Ads Accounts

    ReplyDelete
  64. Buy Facebook Ads Accounts. USA, UK, CA Buy Verified Facebook Business Managers. Buy Facebook 5 Ads Creat and BM With Verified Profile.Buy Facebook Ads Accounts

    ReplyDelete
  65. Buy Verified PayPal Accounts. Buy USA, UK, CA Verified PayPal Accounts, High quality verified personal & Business Accounts. 100% No limit.Buy Verified PayPal Accounts

    ReplyDelete
  66. Buy Trustpilot Reviews. USA, UK, CA, AS, MA, NA country good quality reviews provider.100% safe non-drop 5-star positive reviews.safe & real.Buy Tristpilot Reviews

    ReplyDelete
  67. Online Quran Teacher Pakistan is the best website for your kids to learn the Quran. The Site offers multiple levels of difficultyonline quran teaching pakistan

    ReplyDelete
  68. Online Quran Teacher Pakistan is the best website for your kids to learn the Quran. The Site offers multiple levels of difficultyonline quran teaching pakistan

    ReplyDelete
  69. Online Quran Teacher Pakistan is the best website for your kids to learn the Quran. The Site offers multiple levels of difficultyonline quran teaching pakistan

    ReplyDelete
  70. Online Quran Teacher Pakistan is the best website for your kids to learn the Quran. The Site offers multiple levels of difficultyonline quran teaching pakistan

    ReplyDelete
  71. [email protected] Buy Verified Binance Account https://bestsoftusa.com/product/buy-verified-binance-account/

    ReplyDelete
  72. [email protected] Buy Verified Binance Account https://bestsoftusa.com/product/buy-verified-binance-account/

    ReplyDelete
  73. Buy Verified Binance Account with a cheap and affordable rate and full verified accounts. we provide full verified accounts and documents for a lifetime .Buy Verified Binance Account

    ReplyDelete
  74. This is the best post I have ever seen. Very clear and simple. Mid-portion Is quite interesting though. Keep doing this. I will visit your site again. Christopher Moltisanti Jacket

    ReplyDelete
  75. Buy Verified Binance Accounts. USA, UK, CA kyc-verified binance account. All Documents buy fully verified binance account.Buy Verified Binance Accounts

    ReplyDelete
  76. Buy Verified Binance Accounts. USA, UK, CA kyc-verified binance account. All Documents buy fully verified binance account.Buy Verified Binance Accounts

    ReplyDelete
  77. I recently found many useful information in your website especially this blog page.nice informastion. Thanks for sharing .
    Buy Verified Cash App Account

    ReplyDelete
  78. I recently found many useful information in your website especially this blog page.nice informastion. Thanks for sharing .
    Buy Verified Cash App Account

    ReplyDelete
  79. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verfied Bitcoin Enabled Cash AppBuy Verified Cash Account

    ReplyDelete
  80. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verfied Bitcoin Enabled Cash AppBuy Verified Cash Account

    ReplyDelete
  81. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verfied Bitcoin Enabled Cash AppBuy Verified Cash Account

    ReplyDelete
  82. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verfied Bitcoin Enabled Cash AppBuy Verified Cash Account

    ReplyDelete
  83. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verified Bitcoin Enabled Cash AppBuy Verified Cash Account

    ReplyDelete
  84. Buy Verified PayPal Account

    Replay and contact 24/7 Live Support

    E-mail : [email protected]
    WhatsApp : +1(315) 514-9654
    Telegram : @promxs
    Skype : promxs
    Buy Verified PayPal Account

    ReplyDelete
  85. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verified Bitcoin Enabled Cash AppBuy Verified Cash Account

    ReplyDelete
  86. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verfied Bitcoin Enabled Cash AppBuy Verified Cash Account

    ReplyDelete
  87. Buy Verified PayPal Accounts. You can buy verified PayPal accounts to make your business work more smoothly. help you buy Verified PayPal accounts..Buy Verified PayPal Accounts

    ReplyDelete
  88. Buy Verified Cash App Accounts. USA UK CA Verified Cash App Accounts. Bank, Card, SSN, Number, Passport Verified Bitcoin Enabled Cash App. Shop NowBuy Verified Cash App Accounts

    ReplyDelete
  89. The Federal Board of Revenue (FBR) has implemented 6 new slabs for duties and taxes on imported mobile phones. Instead of calculating taxes based oncustom duty taxes

    ReplyDelete
  90. The Federal Board of Revenue (FBR) has implemented 6 new slabs for duties and taxes on imported mobile phones. Instead of calculating taxes based oncustom duty taxes

    ReplyDelete
  91. Buy Verified PayPal Account. Buy USA, UK, CA, AUS phone number and Bank verified and Credit Card verified Cheap Old PayPal account. No limit.Buy Verified PayPal Accounts

    ReplyDelete
  92. Buy Verified Cash App Account. USA UK CA Verified Cash App Account. Bank, Card, SSN, Number, Passport Verfied Bitcoin Enabled Cash AppBuy Verified Cash App Accounts

    ReplyDelete
  93. Omninos Solutions a development Social Media App in Mohali, Chandigarh Provides Best TikTok Clone App, TikTok clone app most remarkable app.TikTok Clone

    ReplyDelete
  94. Omninos Solutions a development Dating App in Mohali, Chandigarh Provides Best Tinder Clone App, Tinder clone app most remarkable app.Tinder Clone

    ReplyDelete
  95. Omninos Solutions provides Uber-Like-Taxi clone application and website development. Uber-Like-Taxi app development clone is of huge demand. Get Uber-Like-Taxi app clone scriptUber Clone

    ReplyDelete

Your comments are valuable for us !!!