SlideShare une entreprise Scribd logo
1  sur  28
Web Browser Extensions
       Development

Largu Dragos Constantin
An 3, Grupa 1, Semian B
Web browser extensions are custom user
created programs which extend the
functionality of web browsers
All major browsers support extensions
The term “extension” is interpreted in different
ways, depending on the browser used
All extensions feature the same development
principles and guidelines
Extensions can be developed either for personal
use, or for public use
For a public extension to be successful, it needs
to not interfere with everyday use of the
browser
Follow simple guidelines to assure quality
                  Light Memory       Constant
  Ease of use
                       Load          Updates


   Simplicity     Customizability   Tech Support
Every browser interprets “extensions” in a
different way
Google Chrome and Safari use the exact term
extensions
Firefox works with Add-ons and Extensions
Internet Explorer works with Browser
Extensions and Helper Objects
Opera works with Extensions and Widgets
Extensions are what we will be exclusively
discussing further
Add-ons are more complex types of programs
designed to run along side the browser (such as
for example an automatic text translator)
Plug-ins are sets of programs created to
enhance modularly designed browsers by
adding functionality to existing elements

  Extensions        Add-ons         Plug-ins
Extensions are practically all powered by Java
Script, styled by CSS and contained in HTML
Each browser implements different languages
for installation (example RDF for Firefox)
Manifest and Assembly files are implemented to
store information about the
author, permissions, application version, etc
Creating extensions in Firefox is a bit
complicated, and many problems may occur
because of Mozilla's fast development cycle
Before starting, these problems need to be
addressed
First, a user profile needs to be created (Start-
>Run->Firefox -P->New Profile)
In about:config, the following Boolean fields
need to be created (all false):
   extensions.checkUpdateSecurity
   extensions.checkCompatibility.9.0 (For Firefox 9.0)
   change .9.0 to any other version you want (for
   example .8.0 for Firefox 8)
Now we’re ready to create a basic extension
Directory structure in Firefox is focused around
localization (meaning folders with different
languages)
The root folder has to contain
   a manifest file (chrome.manifest), which describes
   each file
   an RDF install file (install.rdf), which contains
   installation data
   folders for other elements
When adding a new page to the extension, you
need to create
   a .xul file (containing descriptions of UI elements to
   add to the browser window)
   a .dtd file (containing definitions for the elements
   in the .xul file)
One or more CSS files may be present, which
alter appearance of content in .xul files
You can edit the basic overlay of the browser
window in overlay.xul and overlay.dtd
Java Script is included in a standard way using .js
files
One very important aspect is that for a new
file, the .xul and .dtd files need to have the
same name, for example overlay.xul and
overlay.dtd
Once you are done writing the extension
code, set an extension id in the install.rdf file
Go to %APPDATA%/Mozilla/Extensions and
create a file named exactly as the install id
Inside, write the absolute path to the directory
containing the install and manifest files
Now you have a pointer to your extension files
To deploy the extension, simply pack it in a zip
archive, change the name to .xpi, and
drag&drop it to the Firefox window
Proceed to install it as any other extension
It will be visible in the Add-ons menu under
Extensions
Creating extensions in Chrome is MUCH simpler
than in Firefox
You simply need to create a folder anywhere, in
which you need to put a manifest.json file, a
.icon file that works as a favicon, HTML, CSS and
JS files
Json is conceptually similar to XML, in the sense
that you can define your own content freely
Its syntax is based on an "elementName" :
"elementValue" type structure
To add a functionality, the manifest file needs to
be edited
   for example, to display a new html page, we add
   "browser action" : { "popup": "helloworld.html" }
In order for the extension to be recognized by
Chrome, it needs to be loaded into the browser
using the Extension Manager
After loading, the icon image will appear in the
Chrome menu bar
When you click the icon, your extension will be
launched
Creating extensions in Safari is very
easy, because Safari provides a built in tool
named Extension Builder
The only catch is that you need to have register
at developer.apple.com and follow a set of
instructions
You need a signed certificate in order to use
your extensions
The process is very simple, you just
register, download a certificate file, run it, and
upload an outputted file
Now it’s very similar to how Chrome works, only
you don’t have to create a manifest file
Simply create a directory using the Extension
Builder, and copy all your HTML, JS and CSS files
there (including a .icon file)
You can use the Expression Builder to create
buttons, interfaces and other UI elements
directly from the GUI
After you are done, just press Pack and
Install, and you are done!
It’s really dead simple
Creating extensions in Opera is very straight
forward, pretty much like in Chrome
A basic file structure would be like
   /config.xml
   /index.html
   /background.js
   /popup.html
   /icons/example.png
   /options.html
Opera supports localization, following the same
principles as in Firefox
The basic extension format follows the same
principles as W3C Widgets, meaning you have
to have
   an index.html file which is a start file for the widget
   background.js file which contains ` functions
   one or more “popup” html files with actual content
   a config.xml file with basic configuration info
In order to run your extension, drag&drop the
config.xml file to the browser window
One very important thing to remember is the
Opera strictly follows W3C
recommendations, so if your code is not W3C
valid, you may have problems
Also, Opera allows you to create Widgets, which
are independent mini-applications that run in
separate windows, but provide functionality
similar to Extensions
When choosing the browser for which to
develop extensions, it’s very important to keep
track of the guidelines for developing
extensions
Study thoroughly regarding the capabilities of
each browser to avoid situations in which you
find out half way into your project that the
browser you chose cannot do what you want
Firefox Pros
   well established community, pioneered extensions
   widely used, so a good client base is available
   powerful debugging tools
   strong language capabilities
Firefox Cons
   extremely tedious work is required just to get
   started, and the whole process is over complicated
   there is no clear border between add-ons and
   extensions
Chrome Pros
  very easy setup, perfect for beginners
  you don’t need to create lots of files, which adds to
  the clarity of the project
  fast and lightweight development (you can convert
  entire web applications to extensions very fast)
  Google labs is simply awesome
Chrome Cons
  not many people use it
Safari Pros
   very straight forward development path, thanks to
   the built in Extension Manager
   comfort and ease of use
   strong community of MAC and PC users
   requires certificates in order to develop (security)
Chrome Cons
   PC users don’t really care for Safari
   certification may be complicated for some
Opera Pros
  you are forced to respect W3C Widget standards
  dedicated community with lots of app samples
  relatively simple development process
  you can add browser interface elements at runtime
Chrome Cons
  not many people use opera
  Opera Dragonfly works only while connected to the
  internet
My personal opinion
  I prefer Opera. I’ve been using it for the past 7
  years, and I’ve never had any major complaints
  I think Firefox is overly complicated
  I like Chrome very much because it is very
  lightweight and fast
  Safari’s Extension Builder is an awesome tool!

Contenu connexe

Tendances

Tendances (17)

WEB BROWSER
WEB BROWSERWEB BROWSER
WEB BROWSER
 
Jomc463 beginner wordpress(zeoli)
Jomc463 beginner wordpress(zeoli)Jomc463 beginner wordpress(zeoli)
Jomc463 beginner wordpress(zeoli)
 
Introduction of chrome extension development
Introduction of chrome extension developmentIntroduction of chrome extension development
Introduction of chrome extension development
 
Browsers-sabina ramirez
Browsers-sabina ramirezBrowsers-sabina ramirez
Browsers-sabina ramirez
 
Web Browser And Search Engine ! Batra Computer Centre
Web Browser And Search Engine ! Batra Computer CentreWeb Browser And Search Engine ! Batra Computer Centre
Web Browser And Search Engine ! Batra Computer Centre
 
Wordpress
WordpressWordpress
Wordpress
 
Wordpress
WordpressWordpress
Wordpress
 
Web Browsers
Web BrowsersWeb Browsers
Web Browsers
 
Browsers
BrowsersBrowsers
Browsers
 
Introduction to Web Browser Extension/Add-ons
Introduction to Web Browser Extension/Add-onsIntroduction to Web Browser Extension/Add-ons
Introduction to Web Browser Extension/Add-ons
 
Browsers comparison
Browsers comparisonBrowsers comparison
Browsers comparison
 
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFxWebinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
Webinar - 2020-03-24 - Build your first Microsoft Teams app using SPFx
 
Browser extension
Browser extensionBrowser extension
Browser extension
 
Web Browser
Web BrowserWeb Browser
Web Browser
 
difference between browsers
difference between browsersdifference between browsers
difference between browsers
 
Internet Explorer 9
Internet Explorer 9Internet Explorer 9
Internet Explorer 9
 
Firefox 3 Thai inbreif
Firefox 3 Thai inbreifFirefox 3 Thai inbreif
Firefox 3 Thai inbreif
 

En vedette

Web visibility helper
Web visibility helperWeb visibility helper
Web visibility helperdragoslargu
 
Getting started on MDN (Mozilla Developer Network)
Getting started on MDN (Mozilla Developer Network)Getting started on MDN (Mozilla Developer Network)
Getting started on MDN (Mozilla Developer Network)Robert 'Bob' Reyes
 
Introduction to rust
Introduction to rustIntroduction to rust
Introduction to rustmysangle
 
MozillaPH Rust Hack & Learn Session 2
MozillaPH Rust Hack & Learn Session 2MozillaPH Rust Hack & Learn Session 2
MozillaPH Rust Hack & Learn Session 2Robert 'Bob' Reyes
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSSRachel Andrew
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsShelly Sanchez Terrell
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaChris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back KidEthos3
 

En vedette (9)

Web visibility helper
Web visibility helperWeb visibility helper
Web visibility helper
 
Mozilla
MozillaMozilla
Mozilla
 
Getting started on MDN (Mozilla Developer Network)
Getting started on MDN (Mozilla Developer Network)Getting started on MDN (Mozilla Developer Network)
Getting started on MDN (Mozilla Developer Network)
 
Introduction to rust
Introduction to rustIntroduction to rust
Introduction to rust
 
MozillaPH Rust Hack & Learn Session 2
MozillaPH Rust Hack & Learn Session 2MozillaPH Rust Hack & Learn Session 2
MozillaPH Rust Hack & Learn Session 2
 
The Near Future of CSS
The Near Future of CSSThe Near Future of CSS
The Near Future of CSS
 
Classroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and AdolescentsClassroom Management Tips for Kids and Adolescents
Classroom Management Tips for Kids and Adolescents
 
The Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris LemaThe Buyer's Journey - by Chris Lema
The Buyer's Journey - by Chris Lema
 
The Presentation Come-Back Kid
The Presentation Come-Back KidThe Presentation Come-Back Kid
The Presentation Come-Back Kid
 

Similaire à Web browser extensions development

Google chrome extension
Google chrome extensionGoogle chrome extension
Google chrome extensionJohnny Kingdom
 
Introduction to web page
Introduction to web pageIntroduction to web page
Introduction to web pageMahmoud Shaqria
 
Implementing xpages extension library
Implementing xpages extension libraryImplementing xpages extension library
Implementing xpages extension librarydominion
 
Extension Infrastructure: Recent Achievements and Future Prospects
Extension Infrastructure: Recent Achievements and Future ProspectsExtension Infrastructure: Recent Achievements and Future Prospects
Extension Infrastructure: Recent Achievements and Future ProspectsAlexandro Colorado
 
JavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesJavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesOleksii Prohonnyi
 
Internet Tutorial 01
Internet Tutorial 01Internet Tutorial 01
Internet Tutorial 01dpd
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Startstaobao.com
 
browser of the actuality
browser of the actualitybrowser of the actuality
browser of the actualitycarlosmau-95
 
Firefox OS - Hive Pilani 2015
Firefox OS - Hive Pilani 2015Firefox OS - Hive Pilani 2015
Firefox OS - Hive Pilani 2015Nilay Binjola
 
Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)Goran Kljajic
 

Similaire à Web browser extensions development (20)

Google chrome extension
Google chrome extensionGoogle chrome extension
Google chrome extension
 
Getting started with add ons
Getting started with add onsGetting started with add ons
Getting started with add ons
 
Introduction to web page
Introduction to web pageIntroduction to web page
Introduction to web page
 
browsers MEZH
browsers MEZHbrowsers MEZH
browsers MEZH
 
FAT.Seminar.FOSS_Joomla!
FAT.Seminar.FOSS_Joomla!FAT.Seminar.FOSS_Joomla!
FAT.Seminar.FOSS_Joomla!
 
Browsers
BrowsersBrowsers
Browsers
 
Browsers
BrowsersBrowsers
Browsers
 
Implementing xpages extension library
Implementing xpages extension libraryImplementing xpages extension library
Implementing xpages extension library
 
Extension Infrastructure: Recent Achievements and Future Prospects
Extension Infrastructure: Recent Achievements and Future ProspectsExtension Infrastructure: Recent Achievements and Future Prospects
Extension Infrastructure: Recent Achievements and Future Prospects
 
JavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and LibrariesJavaScript Presentation Frameworks and Libraries
JavaScript Presentation Frameworks and Libraries
 
Browser
BrowserBrowser
Browser
 
Browsers
BrowsersBrowsers
Browsers
 
Internet Tutorial 01
Internet Tutorial 01Internet Tutorial 01
Internet Tutorial 01
 
Chrome Extension Develop Starts
Chrome Extension Develop StartsChrome Extension Develop Starts
Chrome Extension Develop Starts
 
Browser (1)
Browser (1)Browser (1)
Browser (1)
 
Browser (1)
Browser (1)Browser (1)
Browser (1)
 
browser of the actuality
browser of the actualitybrowser of the actuality
browser of the actuality
 
Firefox OS - Hive Pilani 2015
Firefox OS - Hive Pilani 2015Firefox OS - Hive Pilani 2015
Firefox OS - Hive Pilani 2015
 
Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)
 
Wordpress
WordpressWordpress
Wordpress
 

Dernier

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Dernier (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Web browser extensions development

  • 1. Web Browser Extensions Development Largu Dragos Constantin An 3, Grupa 1, Semian B
  • 2. Web browser extensions are custom user created programs which extend the functionality of web browsers All major browsers support extensions The term “extension” is interpreted in different ways, depending on the browser used All extensions feature the same development principles and guidelines
  • 3. Extensions can be developed either for personal use, or for public use For a public extension to be successful, it needs to not interfere with everyday use of the browser Follow simple guidelines to assure quality Light Memory Constant Ease of use Load Updates Simplicity Customizability Tech Support
  • 4. Every browser interprets “extensions” in a different way Google Chrome and Safari use the exact term extensions Firefox works with Add-ons and Extensions Internet Explorer works with Browser Extensions and Helper Objects Opera works with Extensions and Widgets
  • 5. Extensions are what we will be exclusively discussing further Add-ons are more complex types of programs designed to run along side the browser (such as for example an automatic text translator) Plug-ins are sets of programs created to enhance modularly designed browsers by adding functionality to existing elements Extensions Add-ons Plug-ins
  • 6. Extensions are practically all powered by Java Script, styled by CSS and contained in HTML Each browser implements different languages for installation (example RDF for Firefox) Manifest and Assembly files are implemented to store information about the author, permissions, application version, etc
  • 7. Creating extensions in Firefox is a bit complicated, and many problems may occur because of Mozilla's fast development cycle Before starting, these problems need to be addressed First, a user profile needs to be created (Start- >Run->Firefox -P->New Profile)
  • 8. In about:config, the following Boolean fields need to be created (all false): extensions.checkUpdateSecurity extensions.checkCompatibility.9.0 (For Firefox 9.0) change .9.0 to any other version you want (for example .8.0 for Firefox 8) Now we’re ready to create a basic extension
  • 9. Directory structure in Firefox is focused around localization (meaning folders with different languages) The root folder has to contain a manifest file (chrome.manifest), which describes each file an RDF install file (install.rdf), which contains installation data folders for other elements
  • 10. When adding a new page to the extension, you need to create a .xul file (containing descriptions of UI elements to add to the browser window) a .dtd file (containing definitions for the elements in the .xul file) One or more CSS files may be present, which alter appearance of content in .xul files
  • 11. You can edit the basic overlay of the browser window in overlay.xul and overlay.dtd Java Script is included in a standard way using .js files One very important aspect is that for a new file, the .xul and .dtd files need to have the same name, for example overlay.xul and overlay.dtd
  • 12. Once you are done writing the extension code, set an extension id in the install.rdf file Go to %APPDATA%/Mozilla/Extensions and create a file named exactly as the install id Inside, write the absolute path to the directory containing the install and manifest files Now you have a pointer to your extension files
  • 13. To deploy the extension, simply pack it in a zip archive, change the name to .xpi, and drag&drop it to the Firefox window Proceed to install it as any other extension It will be visible in the Add-ons menu under Extensions
  • 14. Creating extensions in Chrome is MUCH simpler than in Firefox You simply need to create a folder anywhere, in which you need to put a manifest.json file, a .icon file that works as a favicon, HTML, CSS and JS files
  • 15. Json is conceptually similar to XML, in the sense that you can define your own content freely Its syntax is based on an "elementName" : "elementValue" type structure To add a functionality, the manifest file needs to be edited for example, to display a new html page, we add "browser action" : { "popup": "helloworld.html" }
  • 16. In order for the extension to be recognized by Chrome, it needs to be loaded into the browser using the Extension Manager After loading, the icon image will appear in the Chrome menu bar When you click the icon, your extension will be launched
  • 17. Creating extensions in Safari is very easy, because Safari provides a built in tool named Extension Builder The only catch is that you need to have register at developer.apple.com and follow a set of instructions You need a signed certificate in order to use your extensions
  • 18. The process is very simple, you just register, download a certificate file, run it, and upload an outputted file Now it’s very similar to how Chrome works, only you don’t have to create a manifest file Simply create a directory using the Extension Builder, and copy all your HTML, JS and CSS files there (including a .icon file)
  • 19. You can use the Expression Builder to create buttons, interfaces and other UI elements directly from the GUI After you are done, just press Pack and Install, and you are done! It’s really dead simple
  • 20. Creating extensions in Opera is very straight forward, pretty much like in Chrome A basic file structure would be like /config.xml /index.html /background.js /popup.html /icons/example.png /options.html
  • 21. Opera supports localization, following the same principles as in Firefox The basic extension format follows the same principles as W3C Widgets, meaning you have to have an index.html file which is a start file for the widget background.js file which contains ` functions one or more “popup” html files with actual content a config.xml file with basic configuration info
  • 22. In order to run your extension, drag&drop the config.xml file to the browser window One very important thing to remember is the Opera strictly follows W3C recommendations, so if your code is not W3C valid, you may have problems Also, Opera allows you to create Widgets, which are independent mini-applications that run in separate windows, but provide functionality similar to Extensions
  • 23. When choosing the browser for which to develop extensions, it’s very important to keep track of the guidelines for developing extensions Study thoroughly regarding the capabilities of each browser to avoid situations in which you find out half way into your project that the browser you chose cannot do what you want
  • 24. Firefox Pros well established community, pioneered extensions widely used, so a good client base is available powerful debugging tools strong language capabilities Firefox Cons extremely tedious work is required just to get started, and the whole process is over complicated there is no clear border between add-ons and extensions
  • 25. Chrome Pros very easy setup, perfect for beginners you don’t need to create lots of files, which adds to the clarity of the project fast and lightweight development (you can convert entire web applications to extensions very fast) Google labs is simply awesome Chrome Cons not many people use it
  • 26. Safari Pros very straight forward development path, thanks to the built in Extension Manager comfort and ease of use strong community of MAC and PC users requires certificates in order to develop (security) Chrome Cons PC users don’t really care for Safari certification may be complicated for some
  • 27. Opera Pros you are forced to respect W3C Widget standards dedicated community with lots of app samples relatively simple development process you can add browser interface elements at runtime Chrome Cons not many people use opera Opera Dragonfly works only while connected to the internet
  • 28. My personal opinion I prefer Opera. I’ve been using it for the past 7 years, and I’ve never had any major complaints I think Firefox is overly complicated I like Chrome very much because it is very lightweight and fast Safari’s Extension Builder is an awesome tool!