谷歌浏览器扩展程序manifest.json参数详解
{
// Required
"manifest_version": 2, // manifest编写规范版本,目前主流2
"name": "My Extension", // 插件名
"version": "versionString", // 版本号
// Recommended
"default_locale": "en", // 默认编码
"description": "A plain text description", // 插件描述
"icons": { // 插件下载或浏览时显示的图标,可选多种规格,建议128
"16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png"
},
// Pick one (or none)
"browser_action": {}, // 图标显示在地址栏右边,能在所有页面显示
"page_action": {}, // 图标显示在地址栏右侧(地址栏内),只在特定页面显示
// Optional
"author": "", // 插件作者
"automation": true, // 开启自动化
"background": { // 可常驻浏览器后台的脚本,可以连接其他页面
// Recommended
"persistent": false,
"script": ["background.js"]
},
"background_page": ,
"chrome_settings_overrides": {}, // 覆盖当前的chrome配置
"chrome_ui_overrides": { // 覆盖当前的chrome界面配置
"bookmarks_ui": {
"remove_bookmark_shortcut": true,
"remove_button": true
}
},
"chrome_url_overrides": { // 修改点击相应动作时返回的页面链接,只支持bookmarks、history、newtab三个页面
"bookmarks": "myPage.html",
"history": "myPage.html",
"newtab": "myPage.html"
},
"commands": { // 键盘触发插件快捷键
"_execute_browser_action": {
"suggested_key": {
"windows": "Ctrl+Shift+Y",
"mac": "Command+Shift+Y",
"chromeos": "Ctrl+Shift+U",
"linux": "Ctrl+Shift+J"
}
},
},
"content_capabilities": { // 页面权限
"matches": ["https://*.nyc.corp.google.com/*"],
"permissions": ["unlimitedStorage", "notifications"]
},
"content_scripts": [{ // 可以操作页面元素,不能使用chrome的api
"matches": ["http://www.google.com/*"],
"css": ["mystyles.css"],
"js": ["jquery.js", "myscript.js"]
}],
"content_security_policy": "script-src 'self'; object-src 'self'", // 安全策略,默认情况下禁止使用eval或者Function构造函数,以及内联js,禁止载入外部脚本
"converted_from_user_script": true, // 将用户脚本转化为content script,允许使用GM_* (greasemonkey)方法
"copresence": ,
"current_locale": ,
"devtools_page": "devtools.html", // 在开发中工具中的页面
"event_rules": [{ // 事件监听规则及条件
"event": "declarativeContent.onPageChanged",
"actions": [{
"type": "declarativeContent.ShowPageAction"
}],
"conditions": [{
"type": "declarativeContent.PageStateMatcher",
"css": ["video"]
}]
}],
"externally_connectable": { // 哪些外部扩展、应用或网页能连接此插件
"ids": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"*" // 允许所有可使用 "*"
],
"matches": ["*://*.example.com/*"],
"accepts_tls_channel_id": false
},
"file_browser_handlers": [{ // 允许用户上传文件,只支持Chrome OS
"id": "upload",
"default_title": "Save to Gallery", // 按钮文字
"file_filters": [
"filesystem:*.jpg", // 匹配所有文件可用 "filesystem:*.*"
"filesystem:*.jpeg",
"filesystem:*.png"
]
}],
"file_system_provider_capabilities": { // 允许访问文件系统,只支持Chrome OS
"configurable": true,
"multiple_mounts": true,
"source": "network"
},
"homepage_url": "http://path/to/homepage", // 插件主页,显示在chrome扩展工具列表中
"export": { // 允许其他组件调用自己的模块
"whitelist": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
]
},
"import": [{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}], // 调用其他组件的模块,与其他组件的export属性共用
"incognito": "spanning or split or not_allowed", // 隐身模式
"input_components": [ // 输入管理,键盘事件等
{
"name": "Test IME",
"type": "ime",
"id": "test",
"description": "Test IME", // A user visible description
"language": "en-US", // The primary language this IME is used for
"layouts": ["us::eng"] // The supported keyboard layouts for this IME
}
],
"key": "publicKey", // 自动生成,可不需要
"minimum_chrome_version": "versionString", // 要求支持的chrome的最低版本
"nacl_modules": [{ // 使用native client 模块
"path": "OpenOfficeViewer.nmf",
"mime_type": "application/vnd.oasis.opendocument.spreadsheet"
}],
"oauth2": , // 谷歌账户相关信息
"offline_enabled": true, // 离线使用
"omnibox": { // 搜索关键词推荐
"keyword": "aString"
},
"optional_permissions": ["tabs"], // 运行时权限,非必须权限
"options_page": "options.html", // 设置页,可从扩展工具列表进入
"options_ui": { // 设置页
"chrome_style": true,
"page": "options.html"
},
"permissions": ["tabs"], // 安装时提示的权限,基本权限
"platforms": , // 可以将部分基于平台的功能文件放入_platform_specific目录然后列在此项中减少插件体积
"plugins": [{ "path": "extension_plugin.dll" }], // NPAPI插件
"requirements": { // 安装前置需求
"3D": {
"features": ["webgl"]
}
},
"sandbox": [ // 放入沙盒中运行
{
"pages": [
"page1.html",
"directory/page2.html"
],
// content_security_policy is optional.
"content_security_policy": "sandbox allow-scripts; script-src https://www.google.com"
}
],
"short_name": "Short Name", // 短名称,最长12个字母,如不设置则用name属性代替
"signature": ,
"spellcheck": , // 拼写检查
"storage": { // 描述了各种属性的type,json格式文件,能在storage.managed API中调用
"managed_schema": "schema.json"
},
"system_indicator": , // 实验性API,只在开发版中实现,已弃用
"tts_engine": { // text to speech
"voices": [
{
"voice_name": "Alice",
"lang": "en-US",
"gender": "female",
"event_types": ["start", "marker", "end"]
},
{
"voice_name": "Pat",
"lang": "en-US",
"event_types": ["end"]
}
]
},
"update_url": "http://myhost.com/mytestextension/updates.xml", // 插件更新地址
"version_name": "aString", // 版本名,和version字段的区别是没有格式要求,任意字符串
"web_accessible_resources": ["images/*.png"] // 指定本扩展在注入的目标页面上所需使用的资源的路径
}
url:https://blog.csdn.net/sysuzjz/article/details/51648163
谷歌浏览器扩展程序manifest.json参数详解的更多相关文章
- SpringMVC接受JSON参数详解及常见错误总结我改
SpringMVC接受JSON参数详解及常见错误总结 最近一段时间不想使用Session了,想感受一下Token这样比较安全,稳健的方式,顺便写一个统一的接口给浏览器还有APP.所以把一个练手项目的前 ...
- MySQL程序之mysql参数详解
MySQL程序之mysql参数详解 mysql 是一个命令行客户程序,用于交互式或以批处理模式执行SQL语句 用法: mysql [OPTIONS] [database] 参数: 1.-? --hel ...
- SpringMVC接受JSON参数详解及常见错误总结
SpringMVC接受JSON参数详解及常见错误总结 SpringMVC接受JSON参数详解及常见错误总结 最近一段时间不想使用Session了,想感受一下Token这样比较安全,稳健的方式,顺便写一 ...
- SpringMVC接受JSON参数详解
转:https://blog.csdn.net/LostSh/article/details/68923874 SpringMVC接受JSON参数详解及常见错误总结 最近一段时间不想使用Session ...
- Angular Npm Package.Json文件详解
Angular7 Npm Package.Json文件详解 近期时间比较充裕,正好想了解下Angular Project相关内容.于是将Npm官网上关于Package.json的官方说明文档进行了 ...
- iptables参数详解
iptables参数详解 搬运工:尹正杰 注:此片文章来源于linux社区. Iptalbes 是用来设置.维护和检查Linux内核的IP包过滤规则的. 可以定义不同的表,每个表都包含几个内部的链,也 ...
- $.ajax()方法所有参数详解;$.get(),$.post(),$.getJSON(),$.ajax()详解
[一]$.ajax()所有参数详解 url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. type: 要求为String类型的参数,请求方式(post或get)默认为get.注 ...
- linux PHP 编译安装参数详解
linux PHP 编译安装参数详解 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc -- ...
- 【转】jqGrid 各种参数 详解
[原文]http://www.cnblogs.com/younggun/archive/2012/08/27/2657922.htmljqGrid 各种参数 详解 JQGrid JQGrid是一个 ...
随机推荐
- 接口调试之Postman 使用方法详解
一.Postman背景介绍 用户在开发或者调试网络程序或者是网页B/S模式的程序的时候是需要一些方法来跟踪网页请求的,用户可以使用一些网络的监视工具比如著名的Firebug等网页调试工具.今天给大家介 ...
- js注入攻击
注入攻击一般指用户输入数据导致页面乃至整个网站.服务器异常的情况. 直接看一个例子: <html> <head> <title>Test</title> ...
- Kali学习笔记44:SQLMAP
SQLMAP漏洞检测技术: 1.基于布尔的盲注检测:' and 1=1 'and 1=2等 2.基于时间的盲注检测:' and (select * from (select(sleep(20))) ...
- [Swift]LeetCode485. 最大连续1的个数 | Max Consecutive Ones
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1, ...
- 10 个深恶痛绝的 Java 异常。。
异常是 Java 程序中经常遇到的问题,我想每一个 Java 程序员都讨厌异常,一 个异常就是一个 BUG,就要花很多时间来定位异常问题. 什么是异常及异常的分类请看这篇文章:一张图搞清楚 Java ...
- 【异常】Servlet.service() for servlet [springMvc] in context with path [/orderdishessystem] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: net/sf/ezmorph/M
今天做登录的时候,引入json-lib-2.1-jdk15.jar的包时,执行到JSONObject jsonObject = new JSONObject()对象就报标题的那个错. 原来是除了要导入 ...
- PyCharm2019 激活码
因公司的需求,需要做一个爬取最近上映的电影.列车号.航班号.机场.车站等信息,所以需要我做一个爬虫项目,当然java也可以做爬虫,但是还是没有python这样方便,所以也开始学习Python啦!!! ...
- pytorch学习:准备自己的图片数据
图片数据一般有两种情况: 1.所有图片放在一个文件夹内,另外有一个txt文件显示标签. 2.不同类别的图片放在不同的文件夹内,文件夹就是图片的类别. 针对这两种不同的情况,数据集的准备也不相同,第一种 ...
- Java代码复用的三种常用方式:继承、组合和代理
复用代码是Java众多引人注目的功能之一.这句话很通顺,没什么问题,但问题在于很多人并不清楚“复用”是什么.就好像我说“沉默王二是一个不止会写代码的程序员”,唉,沉默王二是谁? 我们需要来给“复用”下 ...
- .NET Core实战项目之CMS 第三章 入门篇-源码解析配置文件及依赖注入
作者:依乐祝 原文链接:https://www.cnblogs.com/yilezhu/p/9998021.html 写在前面 上篇文章我给大家讲解了ASP.NET Core的概念及为什么使用它,接着 ...