Wednesday, February 18, 2015
Building an extension
Extension
manifest.json
(metadata that describes an extension)
permissions and pointing to other components of an extension
Components
Browser action
Page action
Content scripts: injected into selected pages (similar to user scripts)
Background page: long running scripts help manage state and co-ordinate tasks across extension components
Utility web files: <images, java script libraries, flash movies ..>
chrome is the top level object. It has several modules.
manifest.json
(metadata that describes an extension)
permissions and pointing to other components of an extension
Components
Browser action
Page action
Content scripts: injected into selected pages (similar to user scripts)
Background page: long running scripts help manage state and co-ordinate tasks across extension components
Utility web files: <images, java script libraries, flash movies ..>
chrome is the top level object. It has several modules.
Basics
Extension -> ID = hash(public key)
public key private key
Extensions are packaged as :
CRX file :
public key signature (private key on z) zip file of extension Z
Extension UI
Browser Action (buttons next to the omnibox)
supports popups, badges
Page Action ( in omnibox)
supports only popups
Content Scripts: uses content of the page itself
Google Chrome
offers APIs that only extensions code can access (available under chrome object, which has several modules)
Multi process architecture
Web pages in java script run in separate processes which are separate from the main browser process
Runs extension in sub-processes
public key private key
Extensions are packaged as :
CRX file :
public key signature (private key on z) zip file of extension Z
Extension UI
Browser Action (buttons next to the omnibox)
supports popups, badges
Page Action ( in omnibox)
supports only popups
Content Scripts: uses content of the page itself
Google Chrome
offers APIs that only extensions code can access (available under chrome object, which has several modules)
Multi process architecture
Web pages in java script run in separate processes which are separate from the main browser process
Runs extension in sub-processes
Subscribe to:
Posts (Atom)
