Google 크롬 확장 프로그램을 firebase 데이터베이스과 연결하는 방법. 간단한 웹 페이지처럼 연결하려고 시도했지만 확장 프로그램이 작동하지 않습니다. 내 HTML 파일에서 firebase를 초기화 할 때 인라인 코드에 대한 오류를 제공합니다. 오류는 다음과 같습니다 : 'cdn.firebase.com/v0/firebase.js'스크립트를로드하는 것을 거부했습니다. "스크립트 src에 '자기'방울 : 파일 시스템 : 크롬 확장-자원"크롬 확장 프로그램으로 내 firebase 데이터베이스에 연결할 수 없습니다.
// Initialize Firebase
Firebase.enableLogging(true);
var ref = new Firebase("https://test-7c659.firebaseio.com")
var config = {
apiKey: "AIzaSyBxmZNZ0FyHavvPQ7Q7fQAn2875qmdXtH0",
authDomain: "test-7c659.firebaseapp.com",
databaseURL: "https://test-7c659.firebaseio.com",
projectId: "test-7c659",
storageBucket: "test-7c659.appspot.com",
messagingSenderId: "578149428062"
};
firebase.initializeApp(config);
<!doctype html>
<!--
This page is shown when the extension button is clicked, because the
"browser_action" field in manifest.json contains the "default_popup" key with
value "popup.html".
-->
<html>
<head>
<script src="canvasjs.min.js"></script>
<script src="popup.js"></script>
<link rel="stylesheet" type="text/css" href="bootstrap.css">
<title>Neurostic</title>
<style>
body {
margin: 20px 20px 8px 20px;
width: 400px;
direction: ltr;
height: 400px;
}
</style>
</head>
<body>
<h4 id = "object" onclick="fire();">Health Care</h4>
<div id="chartContainer" style="height: 300px; width: 100%;" ></div>
<script type="text/javascript" src="https://cdn.firebase.com/v0/firebase.js"></script>
<script type="text/javascript" src=add_firebase()></script>
</body>
</html>
_ _ 어떤 오류 "그것은 인라인 코드에 대한 오류를 준다"크롬 확장에 중포 기지 사용에 대한 예를 찾을 수 있습니까? 질문을 [mcve]로 업데이트하십시오. – evolutionxbox
"https://cdn.firebase.com/v0/firebase.js"스크립트가 다음 내용 보안 정책 지시문을 위반했기 때문에로드하지 못했습니다. "script-src 'self'blob : filesystem : chrome-extension-resource : " –
질문에 넣을 수 있습니까? 그 오류는 매우 중요합니다. – evolutionxbox