我有一个 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();