Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rpost(url, content_type, body) {
- let xhr = new XMLHttpRequest();
- xhr.open('POST', url, false);
- xhr.setRequestHeader('content-type', content_type);
- xhr.send(body);
- return xhr.responseText;
- }
- function add_bookmark(id, tags, isPrivate) {
- let token = '',
- data = rpost('/ajax/illusts/bookmarks/add',
- 'application/json;charset=utf-8',
- JSON.stringify({ comment: "", illust_id: id, restrict: isPrivate, tags: tags })
- );
- new_win.console.log('RES: ' + data);
- }
- //add_bookmark('00000000', ['simple','text'], false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement