0
내 북마크를 콘솔에 출력하는 Chrome 확장 프로그램이 있습니다. 하지만 출력하는 대신 콘텐츠 스크립트를 사용하여이 모든 북마크를 원격 서버에 보내고 싶습니다.크롬 확장의 출력을 서버에 전송
어떻게하면됩니까? manifest.json 파일에 포함될 특별한 권한이 있습니까?
function getBookmarks()
{
........ (*get the bookmarks and store them in an array BookArray)
var xhr = new XMLHttpRequest();
xhr.open("GET", "server_domain", true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
(*send the entire array to the server *)
}
}
xhr.send();
나는 위의 코드를 내가 사용하고있는 XMLHttpRequest와 함께 추가했다. 전체 배열을 서버로 보내야합니다. 어떻게해야할지 모르겠다. – user782400