jquery 未在 chrome 扩展中加载

2024-01-19

我正在尝试将本地 jquery 文件加载到 chrome 扩展中。这就是我的 manifest.json 的样子:

{
  "name": "TV",
  "version": "0.1",
  "description": "Search",
  "icons": { "128": "icon.jpg" },
    "options_page": "options.html",
  "browser_action": {
    "default_title": "TV",
    "default_icon": "icon.jpg",
    "default_popup": "popup.html"
  },
  "permissions": [
    "http://*.thetvdb.com/*", "tabs"
  ],
"content_scripts": [ {
    "matches": [ "http://*/*", "https://*/*", "*://jquery.com/*"],
    "js": [ "jquery.js", "options.js" ]
  }]
}

以及 options.js 中的函数:

function searchS(){
    console.log($)
}

这让我返回: 未捕获的引用错误:$ 未定义

有什么建议么?谢谢!


None

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

jquery 未在 chrome 扩展中加载 的相关文章