SlideShare ist ein Scribd-Unternehmen logo
1 von 61
Bed Boys Gang

Mr. Thapakit    Student ID: 54701760
Sarakham
Mr. Nattaphat   Student ID: 54701995
Khamnon
Mr. Vikornsak   Student ID: 54703727
Rakhnoo
Mr. Wissarut    Student ID: 54703762
Katathikarn
Mr. Somjean     Student ID: 54704041
Sangdao
Mr. Surasak     Student ID: 54704304
Phetmanee
How do we start ?
  Follow the Getting Started Tutorial


     Read the Overview


     Keep up-to-date by reading the Chromium blog


  Subscribe to the chromium-extensions group
Overview
What are Extensions
    ?
• Small software programs
• Modify and enhance functionality of
  Chrome browser
• Implement using Web Technologies
• Also use to build packaged apps
• Have little to no user interface
• Don’t need to depend on content from
  the web
The Basics
Extensions UIs
Packaged app UIs
Architectur
e
Background Page
UI Pages
Content Scripts
Files
Files
• A manifest file (JSON)
• One or more HTML files
  (unless the extension is a theme)
• Optional : One or more JavaScript files
• Optional : Any other files your extension
  needs
  for example, image files
The Manifest File
(manifest.json)




                    manifest.json
Using the
Chrome.*
APIs
Asynchronous vs.
•
     Synchronous APIs
    Most methods in the chrome.*
  are asynchronous
• they return immediately, without waiting
  for the operation to finish.
• If you need to know the outcome of that
  operation, then you pass a callback
  function into the method.
• That callback is executed later
  (potentially much later), sometime after
    chrome.tabs.create(object createProperties,
  the method returns. Here's an example of
                 function callback)

  the signature for an asynchronous method:
Asynchronous vs.
•
    Synchronousare synchronous.
  Other chrome.* methods
• Synchronous methods never have a
  callback because they don't return until
  they've completed all their work.
• Often, synchronous methods have a return
  type.
  Consider the
• DOMWindow chrome.extension.getBackgroundPage()
  chrome.extensions.getBackgroundPage()
  method:
Example: Using a
callback
Communicat
ion
between
pages
Communication
•
      betweenwithin an extension often
    The HTML pages
                   Pages
  need to communicate.
• Because all of an extension's pages execute
  in same process on the same thread, the
  pages can make direct function calls to each
  other.
• The HTML pages within an extension often
  need to communicate.
• Because all of an extension's pages execute
  in same process on the same thread, the
  pages can make direct function calls to each
Saving data
and
Incognito
mode
Saving data &
•
      Incognito data using the HTML5
    Extensions can save
                        mode
    web storage API
    (such as localStorage)
•   Or by making server requests that result in
    saving data.
•   Whenever you want to save something, first
    consider whether
    it's from a window that's in incognito mode.
•   By default, extensions don't run in incognito
    windows, and packaged apps do.
•   You need to consider what a user expects
Saving data &
•
      Incognito modethe window
    Incognito mode promises that
  will leave no tracks.
• When dealing with data from incognito
  windows, do your best
  to honor this promise.
• For example, if your extension normally
  saves browsing history
  to the cloud, don't save history from
  incognito windows.
• On the other hand, you can store your
  extension's settings
Saving data &
   Incognito mode

If a piece of data might show
where           a          user
has been on the web or what
the     user      has     done,
don't store it if it's from an
incognito window.
Saving data &
Incognito mode
Introducin
g
to JSON
JSON
•   JavaScript Object Notation
•   easy for humans to read and write
•   easy for machines to parse and generate
•   based on a subset of the JavaScript
    Programming Language, Standard ECMA-262
    3rd Edition – December 1999
• text format that is completely language
  independent
• uses conventions that are familiar to
  programmers of
  the C-family of languages
JSON – built 2
     structures
A collection of name/value pairs. In various
languages,       this      is    realized      as
an object, record, struct, dictionary, hash
                      table,
keyed list, or associative array.
An ordered list of values. In most languages,
this                  is                 realized
as an array, vector, list, or sequence.
Object
Array
Value
String
Number
JSON Example




               manifest.json
Google
Chrome
Extensions
Features
Browser UI
Changing the Google Chrome chrome
Browser Actions   Add icons to the toolbar (extensions
                  only)
Desktop           Notify users of important events
Notifications
Omnibox           Add a keyword to the address bar
Option Pages      Let users customize your extension
Override Pages    Implement your own version of
                  standard browser pages such as the
                  New Tab page
Page Actions      Add temporary icons inside the
                  address bar
                  (extensions only)
Browser Interaction
Interacting with Google in other
ways
Bookmarks    Create, organize, and otherwise
             manipulate the user's bookmarks
Cookies      Explore and modify the browser's
             cookie system
Events       Detect when something interesting
             happens
History      Interact with the browser's record of
             visited pages
Tabs         Create, modify, and rearrange tabs in
             the browser
Windows      Create, modify, and rearrange
             windows in the browser
Implementation
Implementing the innards of your
extension
Accessibility    Make your extension accessible to
(a11y)           people with disabilities
Background       Put all the common code for your
Pages            extension in a single place
Content-Scripts  Run JavaScript code in the context of
                 web pages
Cross-Origin XHR Use XMLHttpRequest to send and
                 receive data from remote servers
Implementation
    (cont.)
Implementing the innards of your
extension
Internationalizati Deal with language and locale
on
Message Passing Communicate from a content script to
                   its parent extension, or vice versa
Optional           Modify your extension's permissions
Permissions
NPAPI Plugins      Load native binary code
Finishing
Finishing and distributing your
extension
Autoupdating    Update extensions automatically
Hosting         Host extensions on Google servers or
                your own
Other           Distribute extensions on your network
Deployment      or with other software
Options
Paging          Create a .crx file so you can distribute
                your extension
Developme
nt
Create and Load an
    extension
1. Create a folder somewhere on your
   computer to contain your extension's
   code.
2. Inside your extension's folder, create a
   text file called manifest.json, and put
   this in it
Create and Load an
    extension
3. Copy this icon to the same folder:
   http://www.box.com/s/6418basa92a0lyckshix
4. Load the extension:
   Bring up the extensions management page
    by clicking the wrench icon      and
    choosing Tools > Extensions.
   If Developer mode has a + by it, click the
    + to add developer information to the page.
    The + changes to a -, and more buttons and
    information appear.
   Click the Load unpacked
    extension button. A file dialog appears.
Create and Load an
      extension
If your extension is valid, its icon appears next to
the address bar, and information about the
extension appears in the extensions page, as the
following screenshot shows
Add code to the
 extension




http://www.box.com/s/82e9lh
       yvh8ri6o8cs61e
Add code to the
     extension
Return to the extensions
management               page,
and click the Reload button to
load           the        new
version of the extension
               Click the extension's icon. A
                            popup
               should appear that displays the
               contents of popup.html
Add code to the
extension
Deploymen
t
Extensions for
    Chrome
Contains extensions for Chrome, which
change how the browser behaves and, in a
limited way, how it looks
If your extension seems more like a website
than a small browser add-on, consider making it
a packaged app. Packaged apps are
implemented as extensions that have the
additional ability to present an app-like interface
Extensions for
    Chrome manifest, and
Every app has a                         most likely
icons,         that        you       put        into
a ZIP file and upload to the Chrome Developer
                     Dashboard.
The Chrome Web Store takes the contents of
this ZIP file and puts them in a cryptographically
signed .crx file. Users download this .crx and
To     create     installable   web    apps      file
when they click the you
extensions,            Install button for your app
                                  should          be
familiar with HTML, JavaScript, and CSS. If
you're targeting Chrome exclusively, you can
depend on HTML5 and the other emerging APIs
that Chrome supports
Extensions for
Chrome
Uploading and
    Publishing

To publish apps to the Chrome Web Store, you
first                    use                   the
Chrome Developer Dashboard to upload your
app                   and                   specify
how its listing should look. Then you can publish
it             either           to             the
world at large or to a few trusted testers.
Uploading and
Publishing
Uploading and
     Publishing
9 STEPs : Publishing your app

   STEP   Choose a developer account
     1:
   STEP   Create a ZIP file
     2:
   STEP   Upload the app
     3:
   STEP   Specify the payment system
     4:
   STEP   Get app constants
     5:
Uploading and
     Publishing
9 STEPs : Publishing your app (cont.)

   STEP   Finish the app
     6:
   STEP   Provide store content
     7:
   STEP   Pay the developer signup fee
     8:
   STEP   Publish the app
     9:
Benefits
Speed

Chrome has taken it a step further.
Chrome is the ultimate in fast
browsing. With Internet connections
getting faster and faster, a browser
should be able to keep up with the
pace of rendering images and
content, which is what Google have
managed to do perfectly.
Simplicity

Chrome on the other hand has
arranged everything in an organized
manner, meaning the focus remains
entirely on what it should be –
browsing the Internet.
Extensions

The extension support in Chrome has
been done fantastically. The ease of
installing new plugins means no
restart is needed, and the browser
speed doesn’t suffer when lots of
extensions    are    installed.  The
functional support for add-ons means
full support for Grease Monkey
scripts too, which is a great added
bonus.
Google chrome extension

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Aem dispatcher – tips & tricks
Aem dispatcher – tips & tricksAem dispatcher – tips & tricks
Aem dispatcher – tips & tricks
 
A story of the passive aggressive sysadmin of AEM
A story of the passive aggressive sysadmin of AEMA story of the passive aggressive sysadmin of AEM
A story of the passive aggressive sysadmin of AEM
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?
 
What’s New in Angular 14?
What’s New in Angular 14?What’s New in Angular 14?
What’s New in Angular 14?
 
Content Security Policy
Content Security PolicyContent Security Policy
Content Security Policy
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host header
 
UDA-Componentes RUP. Combo
UDA-Componentes RUP. ComboUDA-Componentes RUP. Combo
UDA-Componentes RUP. Combo
 
OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)OWASP A4 XML External Entities (XXE)
OWASP A4 XML External Entities (XXE)
 
NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA  NextJS, A JavaScript Framework for building next generation SPA
NextJS, A JavaScript Framework for building next generation SPA
 
UDA-Plugin UDA. Guia de uso del plugin.
UDA-Plugin UDA. Guia de uso del plugin.UDA-Plugin UDA. Guia de uso del plugin.
UDA-Plugin UDA. Guia de uso del plugin.
 
UDA-Anexo gestión de seguridad
UDA-Anexo gestión de seguridadUDA-Anexo gestión de seguridad
UDA-Anexo gestión de seguridad
 
Adobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep diveAdobe Experience Manager - Replication deep dive
Adobe Experience Manager - Replication deep dive
 
Rest API Testing
Rest API TestingRest API Testing
Rest API Testing
 
Offzone | Another waf bypass
Offzone | Another waf bypassOffzone | Another waf bypass
Offzone | Another waf bypass
 
XXE
XXEXXE
XXE
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser CachingAEM (CQ) Dispatcher Security and CDN+Browser Caching
AEM (CQ) Dispatcher Security and CDN+Browser Caching
 
AEM Sightly Template Language
AEM Sightly Template LanguageAEM Sightly Template Language
AEM Sightly Template Language
 
JavaScript Fetch API
JavaScript Fetch APIJavaScript Fetch API
JavaScript Fetch API
 
Introdução APIs RESTful
Introdução APIs RESTfulIntrodução APIs RESTful
Introdução APIs RESTful
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
 

Ähnlich wie Google chrome extension

Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & Extensions
Varun Raj
 
Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents
webhostingguy
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Starts
taobao.com
 
Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)
Michael Dobe, Ph.D.
 

Ähnlich wie Google chrome extension (20)

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
 
Web browser extensions development
Web browser extensions developmentWeb browser extensions development
Web browser extensions development
 
Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & Extensions
 
Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents Creating Effective Web Pages Creating HTML Documents
Creating Effective Web Pages Creating HTML Documents
 
Office 365 Developer Bootcamp: Microsoft Teams
Office 365 Developer Bootcamp: Microsoft TeamsOffice 365 Developer Bootcamp: Microsoft Teams
Office 365 Developer Bootcamp: Microsoft Teams
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Starts
 
Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)
 
Chrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpointChrome Extensions - Basic concepts powerpoint
Chrome Extensions - Basic concepts powerpoint
 
Creating chrome-extension
Creating chrome-extensionCreating chrome-extension
Creating chrome-extension
 
Cordova: APIs and instruments
Cordova: APIs and instrumentsCordova: APIs and instruments
Cordova: APIs and instruments
 
Apache Cordova
Apache CordovaApache Cordova
Apache Cordova
 
Flex Introduction
Flex Introduction Flex Introduction
Flex Introduction
 
Web designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lessonWeb designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lesson
 
CMS & Chrome Extension Development
CMS & Chrome Extension DevelopmentCMS & Chrome Extension Development
CMS & Chrome Extension Development
 
Getting started with add ons
Getting started with add onsGetting started with add ons
Getting started with add ons
 
Orange is the new blue: How to port Chrome Extension to Firefox Extension
Orange is the new blue: How to port Chrome Extension to Firefox ExtensionOrange is the new blue: How to port Chrome Extension to Firefox Extension
Orange is the new blue: How to port Chrome Extension to Firefox Extension
 
Buzzword, How'd They Build That?
Buzzword, How'd They Build That?Buzzword, How'd They Build That?
Buzzword, How'd They Build That?
 
Chrome Extensions for Web Hackers
Chrome Extensions for Web HackersChrome Extensions for Web Hackers
Chrome Extensions for Web Hackers
 
Browser Extensions for Web Hackers
Browser Extensions for Web HackersBrowser Extensions for Web Hackers
Browser Extensions for Web Hackers
 
Introduction to web page
Introduction to web pageIntroduction to web page
Introduction to web page
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 

Google chrome extension

  • 1.
  • 2. Bed Boys Gang Mr. Thapakit Student ID: 54701760 Sarakham Mr. Nattaphat Student ID: 54701995 Khamnon Mr. Vikornsak Student ID: 54703727 Rakhnoo Mr. Wissarut Student ID: 54703762 Katathikarn Mr. Somjean Student ID: 54704041 Sangdao Mr. Surasak Student ID: 54704304 Phetmanee
  • 3. How do we start ? Follow the Getting Started Tutorial Read the Overview Keep up-to-date by reading the Chromium blog Subscribe to the chromium-extensions group
  • 5. What are Extensions ? • Small software programs • Modify and enhance functionality of Chrome browser • Implement using Web Technologies • Also use to build packaged apps • Have little to no user interface • Don’t need to depend on content from the web
  • 13. Files
  • 14. Files • A manifest file (JSON) • One or more HTML files (unless the extension is a theme) • Optional : One or more JavaScript files • Optional : Any other files your extension needs for example, image files
  • 17. Asynchronous vs. • Synchronous APIs Most methods in the chrome.* are asynchronous • they return immediately, without waiting for the operation to finish. • If you need to know the outcome of that operation, then you pass a callback function into the method. • That callback is executed later (potentially much later), sometime after chrome.tabs.create(object createProperties, the method returns. Here's an example of function callback) the signature for an asynchronous method:
  • 18. Asynchronous vs. • Synchronousare synchronous. Other chrome.* methods • Synchronous methods never have a callback because they don't return until they've completed all their work. • Often, synchronous methods have a return type. Consider the • DOMWindow chrome.extension.getBackgroundPage() chrome.extensions.getBackgroundPage() method:
  • 21. Communication • betweenwithin an extension often The HTML pages Pages need to communicate. • Because all of an extension's pages execute in same process on the same thread, the pages can make direct function calls to each other. • The HTML pages within an extension often need to communicate. • Because all of an extension's pages execute in same process on the same thread, the pages can make direct function calls to each
  • 23. Saving data & • Incognito data using the HTML5 Extensions can save mode web storage API (such as localStorage) • Or by making server requests that result in saving data. • Whenever you want to save something, first consider whether it's from a window that's in incognito mode. • By default, extensions don't run in incognito windows, and packaged apps do. • You need to consider what a user expects
  • 24. Saving data & • Incognito modethe window Incognito mode promises that will leave no tracks. • When dealing with data from incognito windows, do your best to honor this promise. • For example, if your extension normally saves browsing history to the cloud, don't save history from incognito windows. • On the other hand, you can store your extension's settings
  • 25. Saving data & Incognito mode If a piece of data might show where a user has been on the web or what the user has done, don't store it if it's from an incognito window.
  • 28. JSON • JavaScript Object Notation • easy for humans to read and write • easy for machines to parse and generate • based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition – December 1999 • text format that is completely language independent • uses conventions that are familiar to programmers of the C-family of languages
  • 29. JSON – built 2 structures A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array. An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
  • 31. Array
  • 32. Value
  • 35. JSON Example manifest.json
  • 37. Browser UI Changing the Google Chrome chrome Browser Actions Add icons to the toolbar (extensions only) Desktop Notify users of important events Notifications Omnibox Add a keyword to the address bar Option Pages Let users customize your extension Override Pages Implement your own version of standard browser pages such as the New Tab page Page Actions Add temporary icons inside the address bar (extensions only)
  • 38. Browser Interaction Interacting with Google in other ways Bookmarks Create, organize, and otherwise manipulate the user's bookmarks Cookies Explore and modify the browser's cookie system Events Detect when something interesting happens History Interact with the browser's record of visited pages Tabs Create, modify, and rearrange tabs in the browser Windows Create, modify, and rearrange windows in the browser
  • 39. Implementation Implementing the innards of your extension Accessibility Make your extension accessible to (a11y) people with disabilities Background Put all the common code for your Pages extension in a single place Content-Scripts Run JavaScript code in the context of web pages Cross-Origin XHR Use XMLHttpRequest to send and receive data from remote servers
  • 40. Implementation (cont.) Implementing the innards of your extension Internationalizati Deal with language and locale on Message Passing Communicate from a content script to its parent extension, or vice versa Optional Modify your extension's permissions Permissions NPAPI Plugins Load native binary code
  • 41. Finishing Finishing and distributing your extension Autoupdating Update extensions automatically Hosting Host extensions on Google servers or your own Other Distribute extensions on your network Deployment or with other software Options Paging Create a .crx file so you can distribute your extension
  • 43. Create and Load an extension 1. Create a folder somewhere on your computer to contain your extension's code. 2. Inside your extension's folder, create a text file called manifest.json, and put this in it
  • 44. Create and Load an extension 3. Copy this icon to the same folder:  http://www.box.com/s/6418basa92a0lyckshix 4. Load the extension:  Bring up the extensions management page by clicking the wrench icon and choosing Tools > Extensions.  If Developer mode has a + by it, click the + to add developer information to the page. The + changes to a -, and more buttons and information appear.  Click the Load unpacked extension button. A file dialog appears.
  • 45. Create and Load an extension If your extension is valid, its icon appears next to the address bar, and information about the extension appears in the extensions page, as the following screenshot shows
  • 46. Add code to the extension http://www.box.com/s/82e9lh yvh8ri6o8cs61e
  • 47. Add code to the extension Return to the extensions management page, and click the Reload button to load the new version of the extension Click the extension's icon. A popup should appear that displays the contents of popup.html
  • 48. Add code to the extension
  • 50. Extensions for Chrome Contains extensions for Chrome, which change how the browser behaves and, in a limited way, how it looks If your extension seems more like a website than a small browser add-on, consider making it a packaged app. Packaged apps are implemented as extensions that have the additional ability to present an app-like interface
  • 51. Extensions for Chrome manifest, and Every app has a most likely icons, that you put into a ZIP file and upload to the Chrome Developer Dashboard. The Chrome Web Store takes the contents of this ZIP file and puts them in a cryptographically signed .crx file. Users download this .crx and To create installable web apps file when they click the you extensions, Install button for your app should be familiar with HTML, JavaScript, and CSS. If you're targeting Chrome exclusively, you can depend on HTML5 and the other emerging APIs that Chrome supports
  • 53. Uploading and Publishing To publish apps to the Chrome Web Store, you first use the Chrome Developer Dashboard to upload your app and specify how its listing should look. Then you can publish it either to the world at large or to a few trusted testers.
  • 55. Uploading and Publishing 9 STEPs : Publishing your app STEP Choose a developer account 1: STEP Create a ZIP file 2: STEP Upload the app 3: STEP Specify the payment system 4: STEP Get app constants 5:
  • 56. Uploading and Publishing 9 STEPs : Publishing your app (cont.) STEP Finish the app 6: STEP Provide store content 7: STEP Pay the developer signup fee 8: STEP Publish the app 9:
  • 58. Speed Chrome has taken it a step further. Chrome is the ultimate in fast browsing. With Internet connections getting faster and faster, a browser should be able to keep up with the pace of rendering images and content, which is what Google have managed to do perfectly.
  • 59. Simplicity Chrome on the other hand has arranged everything in an organized manner, meaning the focus remains entirely on what it should be – browsing the Internet.
  • 60. Extensions The extension support in Chrome has been done fantastically. The ease of installing new plugins means no restart is needed, and the browser speed doesn’t suffer when lots of extensions are installed. The functional support for add-ons means full support for Grease Monkey scripts too, which is a great added bonus.