在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/網(wǎng)絡(luò)安全  HTML/ chrome 擴(kuò)展開發(fā) 中 "content_scripts&quot

chrome 擴(kuò)展開發(fā) 中 "content_scripts" 配置的 文件沒(méi)有執(zhí)行?

manifest 配置

{
  "name": "插件的名稱",
  "version": "1.1.1",
  "description": "插件的說(shuō)明",
  "manifest_version": 2,
  "icons": {
    "16": "icons/16.png",
    "32": "icons/32.png",
    "48": "icons/48.png",
    "64": "icons/64.png",
    "128": "icons/128.png"
  },
  "browser_action": {
    "default_icon": "icons/128.png",
    "default_popup": "./taps/taps.html",
    "default_title": "zh_CN"
  },
  "permissions": [
    "http://*/*",
    "https://*/*",
    "tabs",
    "contextMenus",
    "notifications",
    "webRequest",
    "webRequestBlocking",
    "storage"
  ],
  "content_scripts": [
    {
      "matches": [
        "<all_urls>",
        "http://*/*",
        "https://*/*"
      ],
      "js": [
        "libs/zepto.js",
        "taps/content.js"
      ],
      "css": [
        "taps/content.css"
      ],
      "run_at": "document_end"
    }
  ],
  "homepage_url": "https://www.baidu.com",
  "options_page": "options/options.html",
  "options_ui": {
    "page": "options/option.html",
    "chrome_style": true
  },
  "devtools_page": "others/develop.html"
}

content.js

console.log(window.location);

F12 調(diào)試模式下
sources 下 content scripts 里面是空的!

clipboard.png

網(wǎng)上看教程 感覺(jué)很簡(jiǎn)單的配置就可以的。

望有經(jīng)驗(yàn)的指點(diǎn)(主要是google 官方文檔訪問(wèn)不了)謝謝!

回答
編輯回答
孤毒

和我的結(jié)構(gòu)差不多,感覺(jué)可能是目錄路徑問(wèn)題
做插件開發(fā),最好是翻墻看谷歌的官方文檔,api很容易讀懂
有想法可以交流啊

2017年6月17日 02:48