Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fundamentals of Google Chrome Extension Develop...

Mert Metin
October 26, 2024

Fundamentals of Google Chrome Extension Development

Fundamentals of Google Chrome Extension Development

GDG Kocaeli - Devfest Kocaeli 24'
26.10.2024

Kocaeli Bilim Merkezi - Kocaeli

Mert Metin

October 26, 2024
Tweet

More Decks by Mert Metin

Other Decks in Technology

Transcript

  1. Small and single purpose programs that customize browsing experience and

    extend Chrome’s functionality What are Google Chrome Extensions?
  2. An extension project has .crx file format manifest.json must be

    added icons are recommended to represent the extension popup files visible part on browser Main Architecture Project structure
  3. manifest.json A configuration file of the extension which consists of

    critical information about its capabilities and the files it uses Required file for all extensions. Json formatted file. Located on root of extension folder.
  4. Enough properties for starting “name” “manifest_version”: 3 “version” "version_name" manifest.json

    - Properties Optional properties “description” “action” “permissions” “background” “icons” “content-scripts” “default-locale” "host_permissions"
  5. Runs in the content of web pages. “matches” property is

    required that which pages will be injected. js, css properties will inject javascript and css file respectively. content_scripts
  6. Powerful Features for Browser Interaction Exploring Chrome APIs Tabs API

    Create, modify and manage browser’s tab system. Storage API Store and retrieve data, sessions. More APIs: https://developer.chrome.com/docs/extensions/reference/api#chrome_extension_apis
  7. As a solution to support multiple language accross the extension.

    In manifest.json "default_locale": "tr" Directory-file format /_locales/_localeCode_/messages.json *tr,en,fr refer to _localeCode_ Internalization - chrome.i18n
  8. Publishing on Google Web Store Uploading file type is .zip

    which contains extension files, .crx and .pem file