我已使用“<all_urls>”获取权限。但是,我收到了这个错误。“无法访问页面内容。扩展清单必须请求访问相应主机的权限。”
chrome.tabs.create({ url: 'chrome-extension://padekgcemlokbadohgkifijomclgjgif/options.html#!/profile/proxy' }, function(tab) {
chrome.tabs.executeScript(tab.id, { file: 'js /content.js' });
});
清单.json
{
"manifest_version": 2,
"version": "1.0.0",
"name": "Gmail Automation",
"description": "Automation",
"permissions": [
"storage",
"notifications",
"<all_urls>"
],
"icons": {
"16": "resources/img/16.png",
"32": "resources/img/32.png",
"48": "resources/img/48.png",
"64": "resources/img/64.png"
},
"web_accessible_resources": ["js/content.js"],
"background": {
"persistent": false,
"scripts": [
"/js/background.js"
]
}
}
如果这是不可能的。然后请建议我其他方法。我的目标是更改或修改其他现有扩展中的选项。