Therefore, the installation will be a little more than opening a file: All files of our extension will be in the same folder.
To install an extension by opening a file, we need to package our extension, I will tell you about this at the end of the article, because after packaging it is no longer possible to add or change anything in the extension. The allowable size of the icons should be in the following formats: 16*16, 48*48. There are other parameters, but we don’t need them yet. The parameters given in the example above are the standard base configuration without any trickery.
The entire source code of the manifest.json file configuration: Each browser has its own local storage on your computer. This database data is stored on your computer in the browser. Local storage - is an internal database that resides on the client side and stores key pairs and their values. In the permissions we’ll specify working with the context menu, tabs, unlimited local storage, and permission to access any address. Unlike the default_popup page, which runs when you click on the extension’s icon, the background_page only runs once when you start the browser or extension. It will appear when you click on the extension icon in the address bar of the page you are viewing. The important parameters for us are background_page and default_popup – the background and popup window. You should be careful with the quotes in this file, because if even one character is missing, the extension will not install.
The file organization of our Google Chrome extension will be as follows – html pages, JavaScript functions, css styles, and manifest.json configuration. In the gallery you will be able to delete unwanted images.Clicking on the extension icon (near the address bar) will open the gallery.Clicking on the image will bring up a context menu with our “Add to Gallery” feature.The principle of the extension will be as follows: It’s even easier to get all the saved images in one click instead of searching through folders. Let’s say we found an interesting picture and saved it, but it got lost in an infinite number of folders. In this article, I’m going to touch on one of the features when creating an extension – an image gallery. Also, I would like to understand extensions in more detail, since there is no documentation for novice developers, and there is not much useful content on the Internet. The main advantage of extensions is that they run directly from the browser environment, and this makes them easier to use. Third-party extensions allow you to plug the features you want into your Google Chrome web browser for developers and other IT professionals, avoiding the ones you don’t need. For those Internet users who don’t know what an “extension” is.Įxtensions – are additional features that are easily plugged into Google Chrome. I had a choice between a Visual Basic program or web development, and I chose to develop an extension for Google Chrome. Not so long ago, for one of my projects I needed to write a firmware that would perform the actions I needed automatically. Work with the context menu of the browser.We will touch on the main points of extension development, and more advanced mechanisms and functions are planned in future releases.Īfter studying this article you will be able to:
In this article I will try to tell and show by example how to write an extension for Google Chrome browser.