【问题标题】:Google chrome extension not showing the popup谷歌浏览器扩展没有显示弹出窗口
【发布时间】:2012-12-15 06:00:44
【问题描述】:

问题是当我点击图标时,它根本不显示任何东西。

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>

有什么问题?

【问题讨论】:

    标签: javascript json google-chrome google-chrome-extension


    【解决方案1】:

    这是"default_popup": "popup.html" 不是“弹出”

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-01
      • 1970-01-01
      • 2012-04-21
      • 1970-01-01
      • 2022-10-08
      • 2013-10-31
      • 1970-01-01
      相关资源
      最近更新 更多