CityJS India | 18 Feb 2022
Lead Software Engineer at Freshworks Inc.
OMSCS student at Georgia Tech
Free & Open Source Evangelist
Mozilla Representative - India
Ex-Mozilla Tech Speaker
Follow me @hellokarthic
Anything that extend the functionality of the browser. A cross-browser system for developing browser add-ons.
1 Million+ addons downloaded
70+ Add-ons published
250 million+ Add-ons used
2000+ users signup
{
"manifest_version": 2,
"name": "Beastify",
"version": "1.0",
"description": "Super awesome Add-on for super awesome people",
"homepage_url": "https://github.com/mdn/webextensions-examples/tree/master/beastify",
"icons": {
"48": "icons/beasts-48.png"
},
"permissions": [
"activeTab"
],
"browser_action": {
"default_icon": "icons/beasts-32.png",
"theme_icons": [{
"light": "icons/beasts-32-light.png",
"dark": "icons/beasts-32.png",
"size": 32
}],
"default_title": "Beastify",
"default_popup": "popup/choose_beast.html"
},
"web_accessible_resources": [
"beasts/frog.jpg",
"beasts/turtle.jpg"
]
}
Similar to loading normal scripts in the page
Can access DOM structure and use a small subset of the WebExtension APIs
Make cross-domain XHR requests
Exchange messages with their background scripts and can in this way indirectly access all the WebExtension APIs
"content_scripts": [
{
"matches": ["*://*.mozilla.org/*"],
"js": ["jquery.js", "content-script.js"]
}
]
Privileged Scripts
Background Scripts run independently of any tabs
Loaded as soon as the extension is loaded
Stay loaded until the extension is disabled or uninstalled
You can use any of the WebExtension APIs in the script
"background": {
"scripts": ["background-script.js"]
}
browser.browserAction.onClicked.addListener(handleClick);
browser.pageAction.onClicked.addListener(handleClick);
Resources such as images, HTML, CSS, and JavaScript that you include in the extension.
https://developer.mozilla.org
https://tinyurl.com/ff4android
https://developer.chrome.com/docs/extensions/mv3/mv3-migration-checklist/
IRC Channels: #addons:mozilla.org
Mailing List: https://mail.mozilla.org/listinfo/dev-addons
Twitter: @mozamo
@hellokarthic | nkarthic95@gmail.com