InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Chrome extension development tutorials

  • Find a plugin directory location on Mac
  • Extensions - enable developer mode
  • Extension - hello world
  • Extension tutorial - access active page dom
 
  • Home
  • > Tutorials
  • > Web Development
  • > Chrome extension development

Chrome extension tutorial – hello world

on Feb 4, 2016

Chrome extension is very powerful feature of Chrome browser and an extension can be very useful for performing various activities on a web page. This tutorial will cover building a basic hello world chrome extension where clicking on extension icon will open a hello world window.

This tutorial assumes that you have enabled Chrome extension development mode.

  1. Create manifest.json

    Create a directory hello-world and create manifest.json in that dir. Here is very basic manifest.json for hello world extension. Note that next we’ll need default popup and icon for the extension.

    {
      "name": "Hello World",
      "description": "Hello World Chrome App.",
      "version": "0.1",
      "manifest_version": 2,
      "browser_action": {
          "default_icon": "hello-16.png",
          "default_popup": "popup.html"
       }
    }
    
  2. Create default popup html and icon

    We’ll use the following popup.html file.

    <!DOCTYPE html>
    <html>
      <head>
      </head>
      <body>
        <div>Hello world</div>
      </body>
    </html>
    

    The icon file including full source code is also hosted on github at the link hello-world. Place both of these files in hello-world directory.
  3. Load the hello world extension in Chrome

    Open chrome extension page by visiting chrome://extensions and then click on load unpacked extension and select hello-world directory.
    chrome-extensions-load-unpacked-extension-button

    Once extension is loaded, you will see hello world extension entry as shown below:
    chrome-extensions-hello-world-entry

  4. Run the extension

    Look for the hello world extension icon in Chrome toolbar and click on it. You should be able to see a window popup containing hello world.
    chrome-extension-hello-world-icon-in-toolbar

  5. Source code

    You can get the source code used in this tutorial from github hello-world.

Suggested posts:

  1. How to get docker container IP
  2. PHP execute command and capture shell exit status
  3. WordPress – get wpdb class method names
  4. view event handlers in Chrome
  5. Gulp quick start tutorial
  6. PHP array map example
  7. Apache – list loaded modules on Ubuntu
  8. How to convert HTML canvas to png image using javascript
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Chrome extension development, Tutorials, Web Development
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress