我正在开发Chrome扩展程序。我想匹配URL的结尾部分并加载内容脚本只有匹配成功。 例子是 https://akp.archive.corn.skuyo.co/2_6_0_11/abc/Account/Login.aspx
所以我只想在URL的一部分包含Account / Login.aspx
时加载内容脚本我不想比较起点,因为URL也可能 https://pc-001/2_6_0_11/abc/Account/Login.aspx
答案 0 :(得分:0)
{
"manifest_version": 2,
"name": "Autofill Extension",
"description": "Autofills assessment data",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab","tabs", "http://*/*", "https://*/", "<all_urls>"
],
"content_scripts": [
{
"matches": ["*://*/*/abc/Account/Login.aspx*"],
"js": ["jquery.js", "content_script.js","core.js" ]
}
]
}