manifest.json 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {
  2. "update_url": "https://clients2.google.com/service/update2/crx",
  3. // 清单文件的版本,这个必须写,而且必须是2
  4. "manifest_version": 2,
  5. // 插件的名称
  6. "name": "wxNoLazy-Chrome",
  7. // 插件的版本
  8. "version": "1.0.0",
  9. // 插件描述
  10. "description": "__MSG_pluginDesc__",
  11. // 图标,一般偷懒全部用一个尺寸的也没问题
  12. "icons":
  13. {
  14. "16": "icons/16.png",
  15. "32": "icons/32.png",
  16. "48": "icons/48.png",
  17. "64": "icons/64.png",
  18. "128": "icons/128.png"
  19. },
  20. "browser_action": {
  21. "default_icon": "icons/32.png",
  22. "default_title": "__MSG_extensionName__",
  23. "default_popup": "popup.html"
  24. },
  25. // 会一直常驻的后台JS或后台页面
  26. "background":
  27. {
  28. },
  29. // 需要直接注入页面的JS
  30. "content_scripts": [
  31. {
  32. //"matches": ["http://*/*", "https://*/*"],
  33. // "<all_urls>" 表示匹配所有地址
  34. "matches": ["http://mp.weixin.qq.com/*","https://mp.weixin.qq.com/*"],
  35. // 多个JS按顺序注入
  36. "js": ["js/index.js"],
  37. // 代码注入的时间,可选值: "document_start", "document_end", or "document_idle",最后一个表示页面空闲时,默认document_idle
  38. "run_at": "document_end"
  39. }
  40. ],
  41. // 权限申请
  42. "permissions":
  43. [
  44. "contextMenus", // 右键菜单
  45. "tabs", // 标签
  46. "webRequest", // web请求
  47. "webRequestBlocking",
  48. "storage", // 插件本地存储
  49. "http://mp.weixin.qq.com/*", // 可以通过executeScript或者insertCSS访问的网站
  50. "https://mp.weixin.qq.com/*" // 可以通过executeScript或者insertCSS访问的网站
  51. ],
  52. // 插件主页
  53. "homepage_url": "http://blog.yoqi.me",
  54. // Chrome40以前的插件配置页写法
  55. "options_page": "options.html",
  56. // Chrome40以后的插件配置页写法,如果2个都写,新版Chrome只认后面这一个
  57. "options_ui":
  58. {
  59. "page": "options.html",
  60. // 添加一些默认的样式,推荐使用
  61. "chrome_style": true
  62. },
  63. // 向地址栏注册一个关键字以提供搜索建议,只能设置一个关键字
  64. "omnibox": { "keyword" : "Lazy" },
  65. // 默认语言
  66. "default_locale": "zh_CN"
  67. }