我正在开发 chrome 扩展并使用内容脚本在页面上执行此代码
chrome.browserAction.onClicked.addListener(function(tab) {
try{
$('input[type="submit"]').click();
}
catch(err){
($('input[type="button"]').attr('onclick'))(event);
}
});
我收到此错误
“由于 Content-Security-Policy 而拒绝应用内联样式。”
manifest.json 代码:
{
"name": "sites faxana ads clicking exception",
"version": "1.0",
"background_page": "background.html",
"permissions": [
"tabs", "<all_urls>"
],
"browser_action": {
"default_icon": "icon.png",
"name": "Make this page red"
},
"content_security_policy": "default-src 'none'; script-src 'self'"
}