javascript – Google Chrome扩展程序未显示弹出窗口

问题是,当我点击图标时,它根本不显示任何内容.

的manifest.json

{
  "manifest_version": 2,"name"            :  "My cool plugin",// the name of the extension
  "version"         :  "1.0",// version number
  "description"     :  "My cool plugin",// description used in the Chrome Webstore
  "background": "background.html","browser_action"  :  {
    "default_title": "My cool plugin","default_icon"   :  "icon.png",// specifies the default icon
      "popup"          :  "popup.html"   // the page to show when the icon is clicked
  },"permissions": [
    "tabs","http://*/","https://*/*"
  ]
}

popup.html和background.html

<div>
    Lorem ipsum dolor sit amet,consectetur adipisicing elit,sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
    consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
    proident,sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>

问题是什么?

解决方法

这是“default_popup”:“popup.html”不是“popup”

https://developer.chrome.com/extensions/browserAction.html

相关文章

前言 做过web项目开发的人对layer弹层组件肯定不陌生,作为l...
前言 前端表单校验是过滤无效数据、假数据、有毒数据的第一步...
前言 图片上传是web项目常见的需求,我基于之前的博客的代码...
前言 导出Excel文件这个功能,通常都是在后端实现返回前端一...
前言 众所周知,js是单线程的,从上往下,从左往右依次执行,...
前言 项目开发中,我们可能会碰到这样的需求:select标签,禁...