라디오 스트림 크롬 확장을하려고하는데 문제가 있습니다. 나는 일반 JS 같은 브라우저에서 내 스크립트를 실행하면 + HTML + CSS 작동,하지만 난 크롬 확장 프로그램처럼들이받은하려고 할 때이 오류가 얻을 :크롬 확장 콘텐츠 보안 정책 지시문 오류
: 내 매니페스트이 추가 그 후Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' chrome-extension-resource:". Either the 'unsafe-inline' keyword, a hash ('sha256-...'), or a nonce ('nonce-...') is required to enable inline execution.
을
:그러나 그 후 나는 (위의 코드와 매니페스트 라인 오류)
오류 메시지가 표시되었다이 내 매니페스트입니다
{
"background": {
"scripts": [ "jquery.js", "jquery-ui.js", "plate.js" ]
},
"browser_action": {
"default_icon": "Images/action-normal.png",
"default_popup": "player.html",
"default_title": ""
},
"description": "Chrome Player",
"manifest_version": 2,
"name": "Radio Chrome Player",
"permissions": [ "http://www.radio-station.com/" ],
"version": "1.0"
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'"
}
이 주 HTML 파일은 다음과 같습니다
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="jquery.js"></script>
<script src="jquery-ui.js"></script>
<script src="main.js"></script>
<script>$(function(){$("#radioplayere").plate({playlist: [{file:"http://RADIO_STATION_STREAM_URL/;"}], phpGetter: "http://hostingshoutcast.com/stream/plate/php/plate.php"});});</script>
</head>
<body>
<div id="radioplayer">If you are seeing this then an error has occurred!</div>
</body>
</html>
안녕, TNX 내 문제의 해결 반, 지금은 확장처럼 실행할 수 있지만,이 오류 받고 있어요 : 은 '스크립트'http://ws.audioscrobbler.com/2.0/를로드 거부? "script-src 'self'chrome-extension-resource :"을 (를) 위반했기 때문에 callback = jQuery17105420794193632901_13982 ... rtist = David + Craig + ft + Sting & track = Rise + and + Fall & format = json & _ = 1398287917991 '' 그 때문에 나는 노래 이름을 얻을 수 없다. – user3397388
@ user3397388 콘텐츠 보안 정책에 대해 자세히 읽어보십시오. 어떻게 수정해야하는지 설명합니다. – Xan