-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanifest.json
More file actions
66 lines (61 loc) · 2.67 KB
/
manifest.json
File metadata and controls
66 lines (61 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// Step 1. Create the Manifest file
// manifest.json => JSON-formatted manifest file that defines interaction with browser API
// - can include forward-slash comments
// - metadata about extension (version, name, scripts involved, etc.)
// - keys include:
// applications, author, background, browser_action, chrome_settings_overrides,
// chrome_url_overrides, commands, content_scripts, content_security_policy,
// default_locale, description, developer, devtools_page, homepage_url, icons,
// incognito, manifest_version*, name, omnibox, optional_permissions, options_ui,
// page_action, permissions, protocol_handlers, short_name, theme, version,
// version_name, web_accessible_resources
// REQUIRED KEYS: manifest_version, version, name
// MORE INFO: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json
// Step 2. Add Instruction
// Non-persistent, background script is registered in manifest
// Extension will checkout js file for what to do, and only do it once
// Step 3. Introduce a User Interface
// A user interface is introduced to better visualize/control the
// functions of the extension. User interface and icon imagery must be
// registered in manifest
// default_icons are the toolbar icons representing the app
// icons are seen in components of chrome, such as the extension management page;
// common practice is to have icons that can appear optimal on multiple
// resolutions of display, and to be .png
// access to the declarativeContent API must also be registered so the
// popup can appear
// Step 4. Layer Logic
// Adds user interaction to button in extension popup using programmatic inject
// code, not code injection
// tabs API allows for interaction with browser tabs
// => activeTab permission grants temp permission to access current tab content
// Step 5. Give Users Options
// Adds ui for setting options of colors for extension to change chrome dev site to have
// Uses options_pages key to register that particular ui,
{
"name": "Getting Started Example",
"version": "1.0",
"description": "Build an Extension!",
"permissions": ["storage", "declarativeContent", "activeTab"],
"background": {
"scripts": ["background.js"],
"persistent": false
},
"options_page": "options.html",
"page_action": {
"default_popup": "popup.html",
"default_icon": {
"16":"images/get_started16.png",
"32": "images/get_started32.png",
"48": "images/get_started48.png",
"128": "images/get_started128.png"
}
},
"icons": {
"16":"images/get_started16.png",
"32": "images/get_started32.png",
"48": "images/get_started48.png",
"128": "images/get_started128.png"
},
"manifest_version": 2
}