User:Zuhui//Prototyping/Web extension
< User:Zuhui | | Prototyping
so we meet again Json.
manifest.json
from Joseph's class
the keys in manifest.json are predefined rules (APIs) set by the browser. can't change them nor add random stuff.
for permissions
, you can only use the APIs provided by the browser.
{
"manifest_version": 3, //good to use latest extension version
"name": "XPUB",
"version": "1.0", //you can change it later when updating
"permissions": ["tabs", "activeTab", "storage"], //this defines the type of the browser functions your extension would like to use
"description": "Accumulates css.",<br>
"action": { //extension icon will appear at the top right of the browser. this setting defines what happens when you click that icon.
"default_icon": "ICON.gif",
"default_popup": "popup.html",
"default_title": "under"
},
"content_scripts": [ //assign javascript file the extensions would run with (in every webpage)
{
"matches": ["<all_urls>"],
"js": ["under.js"]
}
],
"icons": {
"32": "icon.png" // 32x32pixcel icon
}
}