이 내 응용 프로그램 코드 확장에 내 JS 파일을 허용하지 않았다 :[CRX] :
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>
$(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);
});
});
하지만이있어 :
app.js 파일은 오류 메시지 "다음 내용 보안 정책 지시문"script-src 'self'chrome-extension-resource : "을 위반하여 인라인 스크립트를 실행하는 것을 거부했습니다." 항상..!
왜 작동하지 않습니까? 내가 잘못 했어?
오류 메시지가 매우 obious입니다 참조 : app.js를합니까 당신은 어딘가에 인라인 코드를 사용하거나 인라인 코드 예를'포함 crm_buffer.php의 onclick = "foo();"또는''? –
아니요, 반환해야하는 문자열 "hello world"가 포함되어 있습니다 ... –