content_scripts css,chrome 扩展开发 中 content_scripts 配置的 文件没有执行?
manifest 配置
{
"name": "插件的名稱",
"version": "1.1.1",
"description": "插件的說明",
"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": [
"",
"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 里面是空的!
網(wǎng)上看教程 感覺很簡(jiǎn)單的配置就可以的。
望有經(jīng)驗(yàn)的指點(diǎn)(主要是google 官方文檔訪問不了)謝謝!
總結(jié)
以上是生活随笔為你收集整理的content_scripts css,chrome 扩展开发 中 content_scripts 配置的 文件没有执行?的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: win7系统安装信息服务器不可用怎么办,
- 下一篇: 怎么设置qq信息同步服务器,QQ输入法如