SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
Chrome Extensions
What are they good for, anyway?
Cory Forsyth
@bantic
201 Created
Consultants in NewYork City
Browsers, Then & Now
Browsers Then
20+ Years Old
Text, Links, small GIFs
Credit: Indolering (Own work) [CC0], via Wikimedia Commons
<blink>
Browsers Now
• 10M Lines of Code
• Ubiquitous
• Indispensable
• WebGL, Location
• Orientation, Battery
• High-performance
• Text-to-speech, Audio
• Sentient?
Browsers Now
• TV, Play, Communication, Relaxing
• Filters to the world
• For “working hard and hardly working”
Browsers Now
Extensions: Intro
Internet
Extensions
Browser
Chrome Extensions
• Installable, App-like, JS+CSS+HTML
• Look-over-your-shoulder; and
• Liminal: between your browser and the world
• Powerful position!
• Democratic, open like the web
Chrome Extensions
Put icons here
Put icons hereRead page contents
Watch/change history
Chrome Extensions
Filter network requests
Add DevTool Panes
Chrome Extensions
Take pictures of tab content
Open, close, reorder tabs
Change text
Change icon
Capabilities
• alarms
• manage bookmarks, tabs (open/close/move)
• contentSettings — cookies, javascript
• notifications
• tabCapture — take pictures
• text-to-speech
• override built-in pages (new-tab, bookmarks, history)
• geolocation
• omnibox
• history
Extensions: Anatomy
manifest.json
• the “outline”
• name, description, icons
• permissions
• describes which files to include, and how
manifest.json
{
"name": "My extension",
"version": "1.0",
"description": "Hard to describe.",
"icons": {
"128": "icon128.png"
},
"manifest_version": 2,
manifest.json
content scripts
• Injected js in each tab
• “Bookmarklet on steroids”
• Can read/write DOM
• Can only access chrome
message-passing APIs
• No access to other
`chrome.*` APIs
• Operates in “isolated world”
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": [
"jquery.js",
"content_script.js"
]
}
],
manifest.json
background page (script)
• Accesses Chrome Extension APIs (`chrome.*`)
• Read/change browser state (tabs, windows, etc)
• Add listeners for Chrome API events (toolbar icon clicks,
network requests, tab changes, history updated, etc.)
• No access to DOM
• Uses message-passing to coordinate w/ content script
• Only 1 instance per extension (not per tab)
background page (script)
"background": {
"scripts": [
"background.js"
]
},
manifest.json
1 background script
Content Script injected
Content Script injected
2 Tabs
page / browser action
• Icon in or near toolbar
• Optional “badge” text
• Animatable
• Pop-up (configured via manifest.json); or
• Add click listener (via background page (script))
page / browser action
Browser Action
Page Action
"browser_action": {
"default_icon": "icon.png",
"default_title": "My action"
},
manifest.json
"page_action": {
"default_icon": "icon.png",
"default_title": "My action"
},
manifest.json
Distribution
• “Developer mode”
• Chrome Web Store
• Inline Install
• Developer Dashboard
Distribution
Security
Security
Security
Security
Not kidding. At all.
Chrome Security
• Automatic Static Analysis
• limit Inline Install
• Expectation: Malicious Keyloggers
“Unwanted Software”
• Like 90s Toolbars
• Change default search prefs or new tab page
• Search Engine + Affiliate Code
• Inject Ads
• Binaries that sideload extensions
• “.exe” from “free-tv.com” sites, e.g.
“Unwanted Software”
• New Chrome (v48) shows all extensions
• “Chrome Cleanup” Tool
• like a virus scanner…for a browser
Debugging Extensions
Chrome Extensions: Tips &
Tricks
Chrome Extension Source Viewer (meta!)
• “Developer Mode” at chrome://extensions
• background page link — opens DevTools
• “inspect popup” — opens DevTools
Examples
BPM Browser
Brett Stiller
Decodelia
Melanie Hoff
Marc Abbey
WSJ Bypass
• WSJ has paywall in front of articles
• but allows Google to crawl its content
• How?
• Referer + User-Agent detection
• Solution? Chrome Ext strips referer, changes User-
Agent
• Blog Post by Isoroku Yamamoto
1 user. Wat
Chrome Extensions: Helpful
References
• Manifest.json — The portal into every extension
• hacking-the-browser repo — Lots of simple examples
Chrome Extension Source Viewer
• BPM Browser by Brett Stiller
• Decodelia by Melanie Hoff
• Passtime by Marc Abbey
• Chrome Blog Inline Install Policy Post

Contenu connexe

En vedette

Microsoft tech talk march 28 2014
Microsoft tech talk march 28 2014Microsoft tech talk march 28 2014
Microsoft tech talk march 28 2014Cory Forsyth
 
Stackup New Languages Talk: Ember is for Everybody
Stackup New Languages Talk: Ember is for EverybodyStackup New Languages Talk: Ember is for Everybody
Stackup New Languages Talk: Ember is for EverybodyCory Forsyth
 
Making ember-wormhole work with Fastboot
Making ember-wormhole work with FastbootMaking ember-wormhole work with Fastboot
Making ember-wormhole work with FastbootCory Forsyth
 
EmberFest Mobiledoc Demo Lightning Talk
EmberFest Mobiledoc Demo Lightning TalkEmberFest Mobiledoc Demo Lightning Talk
EmberFest Mobiledoc Demo Lightning TalkCory Forsyth
 
APIs: Internet for Robots
APIs: Internet for RobotsAPIs: Internet for Robots
APIs: Internet for RobotsCory Forsyth
 
Torii: Ember.js Authentication Library
Torii: Ember.js Authentication LibraryTorii: Ember.js Authentication Library
Torii: Ember.js Authentication LibraryCory Forsyth
 
Ember testing internals with ember cli
Ember testing internals with ember cliEmber testing internals with ember cli
Ember testing internals with ember cliCory Forsyth
 
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0Cory Forsyth
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2Ido Flatow
 
What HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For YouWhat HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For YouMark Nottingham
 

En vedette (10)

Microsoft tech talk march 28 2014
Microsoft tech talk march 28 2014Microsoft tech talk march 28 2014
Microsoft tech talk march 28 2014
 
Stackup New Languages Talk: Ember is for Everybody
Stackup New Languages Talk: Ember is for EverybodyStackup New Languages Talk: Ember is for Everybody
Stackup New Languages Talk: Ember is for Everybody
 
Making ember-wormhole work with Fastboot
Making ember-wormhole work with FastbootMaking ember-wormhole work with Fastboot
Making ember-wormhole work with Fastboot
 
EmberFest Mobiledoc Demo Lightning Talk
EmberFest Mobiledoc Demo Lightning TalkEmberFest Mobiledoc Demo Lightning Talk
EmberFest Mobiledoc Demo Lightning Talk
 
APIs: Internet for Robots
APIs: Internet for RobotsAPIs: Internet for Robots
APIs: Internet for Robots
 
Torii: Ember.js Authentication Library
Torii: Ember.js Authentication LibraryTorii: Ember.js Authentication Library
Torii: Ember.js Authentication Library
 
Ember testing internals with ember cli
Ember testing internals with ember cliEmber testing internals with ember cli
Ember testing internals with ember cli
 
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
HTTP by Hand: Exploring HTTP/1.0, 1.1 and 2.0
 
Introduction to HTTP/2
Introduction to HTTP/2Introduction to HTTP/2
Introduction to HTTP/2
 
What HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For YouWhat HTTP/2.0 Will Do For You
What HTTP/2.0 Will Do For You
 

Similaire à Chrome Extensions at Manhattan JS

Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.GaziAhsan
 
Web browser extension development
Web browser extension developmentWeb browser extension development
Web browser extension developmentalecsrusu
 
Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & ExtensionsVarun Raj
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevMihail Mateev
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...Yandex
 
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...nois3
 
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017Amazon Web Services
 
Web Extensions Solve all Enterprise-y Everythings
Web Extensions Solve all Enterprise-y EverythingsWeb Extensions Solve all Enterprise-y Everythings
Web Extensions Solve all Enterprise-y EverythingsDavid Wesst
 
Introduction to Cloud Computing - COA101
Introduction to Cloud Computing - COA101Introduction to Cloud Computing - COA101
Introduction to Cloud Computing - COA101Martin Hamilton
 
Gfx.tw: Two Year Report
Gfx.tw: Two Year ReportGfx.tw: Two Year Report
Gfx.tw: Two Year ReportTimothy Chien
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesVitaly Friedman
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Jeff Haynie
 
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumMobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumJeff Haynie
 
Google chrome extensions
Google chrome extensionsGoogle chrome extensions
Google chrome extensionslillianabe
 
Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09mihaiionescu
 

Similaire à Chrome Extensions at Manhattan JS (20)

Develop Chrome Extension
Develop Chrome ExtensionDevelop Chrome Extension
Develop Chrome Extension
 
Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.Responsive Web Design tips and tricks.
Responsive Web Design tips and tricks.
 
Rwd slidedeck
Rwd slidedeckRwd slidedeck
Rwd slidedeck
 
Web browser extension development
Web browser extension developmentWeb browser extension development
Web browser extension development
 
Chrome Apps & Extensions
Chrome Apps & ExtensionsChrome Apps & Extensions
Chrome Apps & Extensions
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
 
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin..."Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
"Responsive Web Design: Clever Tips and Techniques". Vitaly Friedman, Smashin...
 
Ui dev@naukri-2011
Ui dev@naukri-2011Ui dev@naukri-2011
Ui dev@naukri-2011
 
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...
WUD Rome 2014 - Delightful UX – Real-Life Responsive Web Design (EN) - Vitaly...
 
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
 
Web Extensions Solve all Enterprise-y Everythings
Web Extensions Solve all Enterprise-y EverythingsWeb Extensions Solve all Enterprise-y Everythings
Web Extensions Solve all Enterprise-y Everythings
 
Echelon2010
Echelon2010Echelon2010
Echelon2010
 
Introduction to Cloud Computing - COA101
Introduction to Cloud Computing - COA101Introduction to Cloud Computing - COA101
Introduction to Cloud Computing - COA101
 
Gfx.tw: Two Year Report
Gfx.tw: Two Year ReportGfx.tw: Two Year Report
Gfx.tw: Two Year Report
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Mobile for the rest of us
Mobile for the rest of usMobile for the rest of us
Mobile for the rest of us
 
Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0Appcelerator Titanium at Mobile 2.0
Appcelerator Titanium at Mobile 2.0
 
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator TitaniumMobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
Mobile 2.0 Event: Mobile for the rest of us using Appcelerator Titanium
 
Google chrome extensions
Google chrome extensionsGoogle chrome extensions
Google chrome extensions
 
Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09Google Chrome Extensions - DevFest09
Google Chrome Extensions - DevFest09
 

Dernier

SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predieusebiomeyer
 
Cybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best PracticesCybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best PracticesLumiverse Solutions Pvt Ltd
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书rnrncn29
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxmibuzondetrabajo
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxAndrieCagasanAkio
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书rnrncn29
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxMario
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxNIMMANAGANTI RAMAKRISHNA
 

Dernier (9)

SCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is prediSCM Symposium PPT Format Customer loyalty is predi
SCM Symposium PPT Format Customer loyalty is predi
 
Cybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best PracticesCybersecurity Threats and Cybersecurity Best Practices
Cybersecurity Threats and Cybersecurity Best Practices
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
『澳洲文凭』买拉筹伯大学毕业证书成绩单办理澳洲LTU文凭学位证书
 
Unidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptxUnidad 4 – Redes de ordenadores (en inglés).pptx
Unidad 4 – Redes de ordenadores (en inglés).pptx
 
TRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptxTRENDS Enabling and inhibiting dimensions.pptx
TRENDS Enabling and inhibiting dimensions.pptx
 
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
『澳洲文凭』买詹姆士库克大学毕业证书成绩单办理澳洲JCU文凭学位证书
 
Company Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptxCompany Snapshot Theme for Business by Slidesgo.pptx
Company Snapshot Theme for Business by Slidesgo.pptx
 
ETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptxETHICAL HACKING dddddddddddddddfnandni.pptx
ETHICAL HACKING dddddddddddddddfnandni.pptx
 

Chrome Extensions at Manhattan JS