这是我的应用程序代码:
manifest.json 文件:
{
"name": "YouTradeFx Debugger",
"version": "1.0",
"manifest_version": 2,
"description": "This appliction allow YoutradeFX R&D team to debugging thier applications, by using few tools",
"browser_action": {
"default_popup": "app.html"
}
}
app.html 文件:
<html>
<head>
<title>Source of the application</title>
<script src="jquery.js"></script>
<script src="app.js"></script>
</head>
<body style="width: 350px;">
<span style="display: none;">
<button id="Http">Send Requests</button>
<button id="Cookie">Add Lead Params</button>
<button id="Crm">CRM Faliure</button>
</span>
<div id="Content">
<table id="cons">
<tr>
<td>Please your username:</td>
<td><input type="text" id="names" name="user"></td>
</tr>
<tr>
<td><input type="submit" name="send" value="SEND"></td>
</tr>
</table>
</div>
</body>
</html>
app.js 文件是:
$(document).ready(function(){
var HoldUser = $("input#names").val();
$.get("https://www.mywebsite.com/ChromeExt/crm_buffer.php?uid="+HoldUser,function(data){
$("div#cons").html(data);
});
});
但我收到错误消息“拒绝执行内联脚本,因为它违反了以下内容安全策略指令:”script-src 'self' chrome-extension-resource: “。” 每时每刻..!
为什么不工作?我做错事情了?