SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
Chrome
Extensions
Ron Reiter, 2012
Agenda
●   What is a Chrome Extension?
●   How to Build a Chrome Extension
●   Packaging & Deployment
●   Features
What is a Chrome Extension?

● A powerful JavaScript application which
  integrates with the Chrome browser
● Almost all APIs require explicit permission
  to be used during the installation process
● Easily distributed and maintained through
  the Chrome Web Store
How to build a Chrome Extension

1. Create a directory with a new file called
   manifest.json, along with any needed files
2. Write the manifest file (using the Google
   Developers documentation)
3. Go to Chrome Extensions
4. Check "Developer Mode" on the top right
5. Click "Load Unpacked Extension..."
6. Locate your directory
Packaging
● Chrome extensions provide a packaged
  format called CRX.
● However, we're not creating CRX packages
  because we usually distribute our
  extension through the Chrome Web Store
● Therefore, all we need to do is zip our
  extension and upload it to the Chrome
  Web Store.
Deployment
● Go to the Chrome Web Store, and open up
  the developer dashboard
Deployment (cont.)
● Upload your zip file
● Select whether you want to use a closed
  group or to publish it to the store
Browser Action
● A browser action can have an icon, a
  tooltip, a badge, and a popup
● When users click it, it can either invoke a
  callback function or open a popup
Page Action
● A page action allows specific actions
  according to the page type
● For example, registering to the RSS feed of
  a website
Context Menus
● Chrome extensions can configure context
  menus for actions
Content Scripts
● Allows JavaScript and CSS injection to any
  page, according to the manifest
● Can be automatic or programmatic
  (invoked)
● Good for manipulating pages or
  processing the DOM of pages and sending
  back the information to the extension
Background Page
● Each extension has a background page (an
  HTML page) which is always open
● Should listen to events and do the initial
  configuration (for example, setting up the
  context menu)
● HTML file declared in the manifest as
  "background_page"
Options Page
● Every extension can have a configuration
  page
● Should use local storage for configuration
● HTML file declared in the manifest as
  "options_page"
Tabs API
● Allows managing the Chrome tabs
● Read information on all open tabs
● Execute a content script on a specific tab
● Send messages to Google specific code
  running in tabs
● Get notified about changes (active tab
  changed, tab opened, closed, loaded, etc.)
sendMessage
● Chrome contains a postMessage-like RPC
  mechanism which allows sending
  messages between all components of a
  Chrome extension:
  ○   Background Page
  ○   Content Script
  ○   Popup Page
  ○   etc.
Desktop Notifications
● Useful for notifying users when the
  Chrome extension wants attention, but is
  not focused
Override Pages
● Extensions can override 3 types of default
  pages
  ○ Bookmark manager
  ○ History manager
  ○ New tab
Omnibox
● Allows you to register a new search type
  using the address bar and suggest results
● Specify a keyword, and every time a user
  enters it and presses "space", it will send
  the request to the extension
Themes
● Chrome extensions can also configure
  various images to create new themes for
  the browser
More APIs
● Bookmarks API - Allows managing
  bookmarks
● Cookies API - Allows managing cookies of
  different websites
● History API - Allows managing the
  browser history
More APIs
● Windows API - API for handling all open
  windows, creating / closing windows, etc.
● Cross origin requests - Chrome
  extensions are allowed to send cross
  origin requests as long as they have
  permission for it
● NPAPI - Allows running native code on the
  browser (useful for games)
Questions?
Thank You!

Más contenido relacionado

La actualidad más candente

Introduction to Google Chrome Extensions Development
Introduction to Google Chrome Extensions DevelopmentIntroduction to Google Chrome Extensions Development
Introduction to Google Chrome Extensions DevelopmentJomar Tigcal
 
World wide web architecture presentation
World wide web architecture presentationWorld wide web architecture presentation
World wide web architecture presentationImMe Khan
 
presentation on static website design
presentation on static website designpresentation on static website design
presentation on static website designjyotiyadav1926
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScriptShahDhruv21
 
Android - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskAndroid - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskHoang Ngo
 
Cách sử dụng tên miền thật khi chạy website ở localhost
Cách sử dụng tên miền thật khi chạy website ở localhostCách sử dụng tên miền thật khi chạy website ở localhost
Cách sử dụng tên miền thật khi chạy website ở localhostLel Đặng Văn
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)WebStackAcademy
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap1amitgupta
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and responseSahil Agarwal
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Modelchomas kandar
 

La actualidad más candente (20)

Chrome extensions
Chrome extensionsChrome extensions
Chrome extensions
 
Introduction to Google Chrome Extensions Development
Introduction to Google Chrome Extensions DevelopmentIntroduction to Google Chrome Extensions Development
Introduction to Google Chrome Extensions Development
 
Scripting Languages
Scripting LanguagesScripting Languages
Scripting Languages
 
Http-protocol
Http-protocolHttp-protocol
Http-protocol
 
JavaScript and BOM events
JavaScript and BOM eventsJavaScript and BOM events
JavaScript and BOM events
 
World wide web architecture presentation
World wide web architecture presentationWorld wide web architecture presentation
World wide web architecture presentation
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
 
Ajax
AjaxAjax
Ajax
 
presentation on static website design
presentation on static website designpresentation on static website design
presentation on static website design
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
Objective c
Objective cObjective c
Objective c
 
Android - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTaskAndroid - Thread, Handler and AsyncTask
Android - Thread, Handler and AsyncTask
 
Cách sử dụng tên miền thật khi chạy website ở localhost
Cách sử dụng tên miền thật khi chạy website ở localhostCách sử dụng tên miền thật khi chạy website ở localhost
Cách sử dụng tên miền thật khi chạy website ở localhost
 
Blog - An Online blogging project
Blog - An Online blogging project Blog - An Online blogging project
Blog - An Online blogging project
 
JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)JavaScript - Chapter 13 - Browser Object Model(BOM)
JavaScript - Chapter 13 - Browser Object Model(BOM)
 
Hypertext Transfer Protocol
Hypertext Transfer ProtocolHypertext Transfer Protocol
Hypertext Transfer Protocol
 
Presentation of bootstrap
Presentation of bootstrapPresentation of bootstrap
Presentation of bootstrap
 
Php Ppt
Php PptPhp Ppt
Php Ppt
 
HTTP request and response
HTTP request and responseHTTP request and response
HTTP request and response
 
Document Object Model
Document Object ModelDocument Object Model
Document Object Model
 

Destacado

Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & ExtensionsVarun Raj
 
Chrome extensions
Chrome extensions Chrome extensions
Chrome extensions Ahmad Tahhan
 
IBM Internet-of-Things architecture and capabilities
IBM Internet-of-Things architecture and capabilitiesIBM Internet-of-Things architecture and capabilities
IBM Internet-of-Things architecture and capabilitiesIBM_Info_Management
 
Ibm_IoT_Architecture_and_Capabilities
Ibm_IoT_Architecture_and_CapabilitiesIbm_IoT_Architecture_and_Capabilities
Ibm_IoT_Architecture_and_CapabilitiesIBM_Info_Management
 
Slideshare signup tutorial
Slideshare signup tutorialSlideshare signup tutorial
Slideshare signup tutorialbestabrook
 
World of Watson - DB2 for Linux, UNIX and Windows Roadmap
World of Watson - DB2 for Linux, UNIX and Windows RoadmapWorld of Watson - DB2 for Linux, UNIX and Windows Roadmap
World of Watson - DB2 for Linux, UNIX and Windows RoadmapIBM_Info_Management
 
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudFebruary 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudAmazon Web Services
 
A Reference Architecture for IoT
A Reference Architecture for IoT A Reference Architecture for IoT
A Reference Architecture for IoT WSO2
 
Línea del tiempo Innovación Educativa en México
Línea del tiempo Innovación Educativa en MéxicoLínea del tiempo Innovación Educativa en México
Línea del tiempo Innovación Educativa en MéxicoVictor Manuel Montalvo
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and CryptographyAdam Reagan
 
Free Download Powerpoint Slides
Free Download Powerpoint SlidesFree Download Powerpoint Slides
Free Download Powerpoint SlidesGeorge
 

Destacado (13)

Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & Extensions
 
Chrome extensions
Chrome extensions Chrome extensions
Chrome extensions
 
Firefox vs. chrome
Firefox vs. chromeFirefox vs. chrome
Firefox vs. chrome
 
IBM Internet-of-Things architecture and capabilities
IBM Internet-of-Things architecture and capabilitiesIBM Internet-of-Things architecture and capabilities
IBM Internet-of-Things architecture and capabilities
 
Ibm_IoT_Architecture_and_Capabilities
Ibm_IoT_Architecture_and_CapabilitiesIbm_IoT_Architecture_and_Capabilities
Ibm_IoT_Architecture_and_Capabilities
 
Slideshare signup tutorial
Slideshare signup tutorialSlideshare signup tutorial
Slideshare signup tutorial
 
World of Watson - DB2 for Linux, UNIX and Windows Roadmap
World of Watson - DB2 for Linux, UNIX and Windows RoadmapWorld of Watson - DB2 for Linux, UNIX and Windows Roadmap
World of Watson - DB2 for Linux, UNIX and Windows Roadmap
 
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the CloudFebruary 2016 Webinar Series - Best Practices for IoT Security in the Cloud
February 2016 Webinar Series - Best Practices for IoT Security in the Cloud
 
A Reference Architecture for IoT
A Reference Architecture for IoT A Reference Architecture for IoT
A Reference Architecture for IoT
 
Línea del tiempo Innovación Educativa en México
Línea del tiempo Innovación Educativa en MéxicoLínea del tiempo Innovación Educativa en México
Línea del tiempo Innovación Educativa en México
 
IoT architecture
IoT architectureIoT architecture
IoT architecture
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
Free Download Powerpoint Slides
Free Download Powerpoint SlidesFree Download Powerpoint Slides
Free Download Powerpoint Slides
 

Similar a Building Chrome Extensions

How QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser ExtensionsHow QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser ExtensionsQing-Cheng Li
 
An overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAn overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAces Mndr
 
Chrome Operating System
Chrome Operating System Chrome Operating System
Chrome Operating System Arkoprobho Pal
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Kazuhiro Ogura
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Startstaobao.com
 
CMS & Chrome Extension Development
CMS & Chrome Extension DevelopmentCMS & Chrome Extension Development
CMS & Chrome Extension DevelopmentSarang Ananda Rao
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applicationsTom Martin
 
Extending WordPress' TinyMCE
Extending WordPress' TinyMCEExtending WordPress' TinyMCE
Extending WordPress' TinyMCEHristo Chakarov
 
Chrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpointChrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpointf20190876
 
Chrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptxChrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptxgeekhouse.io
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)Igalia
 
Building testable chrome extensions
Building testable chrome extensionsBuilding testable chrome extensions
Building testable chrome extensionsSeth McLaughlin
 
CBSE class X Computer Applications ch 1 INTERNET
CBSE class X Computer Applications ch 1 INTERNETCBSE class X Computer Applications ch 1 INTERNET
CBSE class X Computer Applications ch 1 INTERNETArchana Dwivedi
 
Push notifications on Google Chrome
Push notifications on Google ChromePush notifications on Google Chrome
Push notifications on Google ChromeGbolahan Alli
 
ppt of web development for diploma student
ppt of web development for diploma student ppt of web development for diploma student
ppt of web development for diploma student Abhishekchauhan863165
 
Installable web applications
Installable web applicationsInstallable web applications
Installable web applicationsLiveChat
 
Extending Alfresco Share 3.3
Extending Alfresco Share 3.3Extending Alfresco Share 3.3
Extending Alfresco Share 3.3Will Abson
 
Chrome extension 2014.08.03
Chrome extension 2014.08.03Chrome extension 2014.08.03
Chrome extension 2014.08.03louisasea666
 

Similar a Building Chrome Extensions (20)

How QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser ExtensionsHow QCLean Works? Introduction to Browser Extensions
How QCLean Works? Introduction to Browser Extensions
 
An overview on Developing Chrome Extensions
An overview on Developing Chrome ExtensionsAn overview on Developing Chrome Extensions
An overview on Developing Chrome Extensions
 
Chrome Operating System
Chrome Operating System Chrome Operating System
Chrome Operating System
 
Introducing chrome apps (ogura)
Introducing chrome apps (ogura)Introducing chrome apps (ogura)
Introducing chrome apps (ogura)
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Starts
 
CMS & Chrome Extension Development
CMS & Chrome Extension DevelopmentCMS & Chrome Extension Development
CMS & Chrome Extension Development
 
Progressive web applications
Progressive web applicationsProgressive web applications
Progressive web applications
 
Extending WordPress' TinyMCE
Extending WordPress' TinyMCEExtending WordPress' TinyMCE
Extending WordPress' TinyMCE
 
Chrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpointChrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpoint
 
Chrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptxChrome Extension Step by step Guide .pptx
Chrome Extension Step by step Guide .pptx
 
You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)You Can Work on the Web Patform! (GOSIM 2023)
You Can Work on the Web Patform! (GOSIM 2023)
 
Building testable chrome extensions
Building testable chrome extensionsBuilding testable chrome extensions
Building testable chrome extensions
 
CBSE class X Computer Applications ch 1 INTERNET
CBSE class X Computer Applications ch 1 INTERNETCBSE class X Computer Applications ch 1 INTERNET
CBSE class X Computer Applications ch 1 INTERNET
 
Push notifications on Google Chrome
Push notifications on Google ChromePush notifications on Google Chrome
Push notifications on Google Chrome
 
ppt of web development for diploma student
ppt of web development for diploma student ppt of web development for diploma student
ppt of web development for diploma student
 
How to develop browser extension
How to develop browser extensionHow to develop browser extension
How to develop browser extension
 
Installable web applications
Installable web applicationsInstallable web applications
Installable web applications
 
Chrome Extension
Chrome ExtensionChrome Extension
Chrome Extension
 
Extending Alfresco Share 3.3
Extending Alfresco Share 3.3Extending Alfresco Share 3.3
Extending Alfresco Share 3.3
 
Chrome extension 2014.08.03
Chrome extension 2014.08.03Chrome extension 2014.08.03
Chrome extension 2014.08.03
 

Más de Ron Reiter

Securing your Bitcoin wallet
Securing your Bitcoin walletSecuring your Bitcoin wallet
Securing your Bitcoin walletRon Reiter
 
Brogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and GitBrogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and GitRon Reiter
 
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...Ron Reiter
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to BootstrapRon Reiter
 
jQuery Mobile Workshop
jQuery Mobile WorkshopjQuery Mobile Workshop
jQuery Mobile WorkshopRon Reiter
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5Ron Reiter
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and ResourcesRon Reiter
 
Introduction to App Engine Development
Introduction to App Engine DevelopmentIntroduction to App Engine Development
Introduction to App Engine DevelopmentRon Reiter
 
Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Ron Reiter
 
Writing HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAEWriting HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAERon Reiter
 

Más de Ron Reiter (11)

Securing your Bitcoin wallet
Securing your Bitcoin walletSecuring your Bitcoin wallet
Securing your Bitcoin wallet
 
Brogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and GitBrogramming - Python, Bash for Data Processing, and Git
Brogramming - Python, Bash for Data Processing, and Git
 
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
BDX 2015 - Scaling out big-data computation & machine learning using Pig, Pyt...
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 
jQuery Mobile Workshop
jQuery Mobile WorkshopjQuery Mobile Workshop
jQuery Mobile Workshop
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Mobile Spaces
Mobile SpacesMobile Spaces
Mobile Spaces
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Introduction to App Engine Development
Introduction to App Engine DevelopmentIntroduction to App Engine Development
Introduction to App Engine Development
 
Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)Digital Audio & Signal Processing (Elad Gariany)
Digital Audio & Signal Processing (Elad Gariany)
 
Writing HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAEWriting HTML5 Web Apps using Backbone.js and GAE
Writing HTML5 Web Apps using Backbone.js and GAE
 

Building Chrome Extensions

  • 2. Agenda ● What is a Chrome Extension? ● How to Build a Chrome Extension ● Packaging & Deployment ● Features
  • 3. What is a Chrome Extension? ● A powerful JavaScript application which integrates with the Chrome browser ● Almost all APIs require explicit permission to be used during the installation process ● Easily distributed and maintained through the Chrome Web Store
  • 4. How to build a Chrome Extension 1. Create a directory with a new file called manifest.json, along with any needed files 2. Write the manifest file (using the Google Developers documentation) 3. Go to Chrome Extensions 4. Check "Developer Mode" on the top right 5. Click "Load Unpacked Extension..." 6. Locate your directory
  • 5. Packaging ● Chrome extensions provide a packaged format called CRX. ● However, we're not creating CRX packages because we usually distribute our extension through the Chrome Web Store ● Therefore, all we need to do is zip our extension and upload it to the Chrome Web Store.
  • 6. Deployment ● Go to the Chrome Web Store, and open up the developer dashboard
  • 7. Deployment (cont.) ● Upload your zip file ● Select whether you want to use a closed group or to publish it to the store
  • 8. Browser Action ● A browser action can have an icon, a tooltip, a badge, and a popup ● When users click it, it can either invoke a callback function or open a popup
  • 9. Page Action ● A page action allows specific actions according to the page type ● For example, registering to the RSS feed of a website
  • 10. Context Menus ● Chrome extensions can configure context menus for actions
  • 11. Content Scripts ● Allows JavaScript and CSS injection to any page, according to the manifest ● Can be automatic or programmatic (invoked) ● Good for manipulating pages or processing the DOM of pages and sending back the information to the extension
  • 12. Background Page ● Each extension has a background page (an HTML page) which is always open ● Should listen to events and do the initial configuration (for example, setting up the context menu) ● HTML file declared in the manifest as "background_page"
  • 13. Options Page ● Every extension can have a configuration page ● Should use local storage for configuration ● HTML file declared in the manifest as "options_page"
  • 14. Tabs API ● Allows managing the Chrome tabs ● Read information on all open tabs ● Execute a content script on a specific tab ● Send messages to Google specific code running in tabs ● Get notified about changes (active tab changed, tab opened, closed, loaded, etc.)
  • 15. sendMessage ● Chrome contains a postMessage-like RPC mechanism which allows sending messages between all components of a Chrome extension: ○ Background Page ○ Content Script ○ Popup Page ○ etc.
  • 16. Desktop Notifications ● Useful for notifying users when the Chrome extension wants attention, but is not focused
  • 17. Override Pages ● Extensions can override 3 types of default pages ○ Bookmark manager ○ History manager ○ New tab
  • 18. Omnibox ● Allows you to register a new search type using the address bar and suggest results ● Specify a keyword, and every time a user enters it and presses "space", it will send the request to the extension
  • 19. Themes ● Chrome extensions can also configure various images to create new themes for the browser
  • 20. More APIs ● Bookmarks API - Allows managing bookmarks ● Cookies API - Allows managing cookies of different websites ● History API - Allows managing the browser history
  • 21. More APIs ● Windows API - API for handling all open windows, creating / closing windows, etc. ● Cross origin requests - Chrome extensions are allowed to send cross origin requests as long as they have permission for it ● NPAPI - Allows running native code on the browser (useful for games)