70 likes | 256 Views
VIDA – Henry Nguyen. How to build an extension for FireFOX /Chrome?. How does it work?. Run at background of Website (main window and all IFrames ) Can hook at: Document Start Document Ready Document End Get resources file: require(' sdk /self'). data.url Browser
E N D
VIDA – Henry Nguyen How to build an extension for FireFOX/Chrome?
How does it work? • Run at background of • Website (main window and all IFrames) • Can hook at: • Document Start • Document Ready • Document End • Get resources file: require('sdk/self').data.url • Browser • When we give an our action and to do some thing • Ex: LightSpot (Take Screenshoot)
Build an extension for FireFox • Using SDK builder: • Download to local and use Command Line • Required Python enviroment • Ex command: “cfx test” or “cfxxpi” • Deploy: “cfx run” or install from file .xpi • Using web builder addon: • Build online • Required addon-builder-helper : • Deploy:
Build an extension for Chrome • Understand structure of manifest.json • Get resources file: chrome.extension.getURL • Using browser build an addon: • Using command line: chrome.exe --pack-extension=c:\myext --pack-extension-key=c:\myext.pem
DEMO • Build FireFox’s Extension • Build Google Chorme’sExtension