Created
December 3, 2017 11:26
-
-
Save OmgImAlexis/2ffeaf308cee508105849f08a91e7a17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var post_ids = Object.keys(archive_posts); | |
var postsToSend = []; | |
var hostname = window.location.hostname; | |
if (jQuery("#postEditData").val().trim() != "") { | |
var edit = jQuery("#postEditData").val(); | |
} | |
for (var i = 0; i < post_ids.length; i++) { | |
var p = { | |
"id": post_ids[i], | |
"hostname": archive_posts[post_ids[i]].hostname + ".tumblr.com", | |
"key": archive_posts[post_ids[i]].key, | |
"clear": false, | |
"caption": edit, | |
"tags": $("#tagData").val() | |
}; | |
postsToSend.push(p); | |
} | |
[ | |
'jockorgy' | |
].forEach(function(url){ | |
$.post('https://qplus.io/svc/addPosts', { | |
hostname: url + ".tumblr.com", | |
posts: postsToSend | |
}, function (data) { | |
if(data == 'ok'){ | |
console.log(url + ".tumblr.com" + ' sent to Qplus!') | |
} else { | |
console.log('Error with ' + url + ".tumblr.com") | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment