Skip to content

Commit 15b3c73

Browse files
author
hrshvrdhn03
committed
Issue#20: Add a static title to the paper doc created
1 parent a76ab2f commit 15b3c73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

js/paper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function createPaper(token, text) {
9292
};
9393

9494
var reqObj = {import_format: "html"};
95-
xhr.send(reqObj);
95+
xhr.send("Paper-extension");
9696
}
9797

9898
function saveToPaper(token, paperId, text) {
@@ -101,16 +101,16 @@ function saveToPaper(token, paperId, text) {
101101
var xhr = new XMLHttpRequest();
102102
xhr.open("POST", url, true);
103103
var rev = result.Revision;
104-
104+
105105
xhr.setRequestHeader("Authorization", "Bearer " + token);
106106
xhr.setRequestHeader("Dropbox-API-Arg", "{\"doc_id\": \"" + paperId + "\",\"doc_update_policy\": \"prepend\",\"revision\": " + rev + ",\"import_format\": \"markdown\"}");
107107
xhr.setRequestHeader("Content-Type", "application/octet-stream");
108-
108+
109109
xhr.onreadystatechange = function() {
110110
if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
111111
new_rev = JSON.parse(this.response);
112112
chrome.storage.sync.set({Revision : new_rev.revision});
113-
}
113+
}
114114
}
115115
xhr.send(text);
116116
});

0 commit comments

Comments
 (0)