Chrome Extension

Basics

Extensions are:

  • Small programs built with web technologies (HTML, Javascript, CSS)

  • zipped into single .crx package, not depend on web

  • Can be distributed and published (requires registration)

Parts:

  • manifest.json

  • service workers (replacing background pages): listen for and respond to events

  • content scripts - run in context of web pages, able to manipulate visited pages

  • options page

  • UI

Capability:



Example & Starters:

  • https://github.com/GoogleChrome/chrome-extensions-samples

Manifest

Reference: https://developer.chrome.com/docs/extensions/mv2/manifest/

Basic Information

name, desc, version

Browser Action

icon, tooltip, badge, popup etc.

Commands

Keyboard shortcut


UI


Service Worker