function reload_syndications() {
$.getJSON("/micropub/syndications", function(data){
if(data.targets) {
$("#syndication-container").html('
');
for(var i in data.targets) {
var target = data.targets[i].target;
var uid = data.targets[i].uid;
var favicon = data.targets[i].favicon;
$("#syndication-container ul").append('');
}
bind_syndication_buttons();
} else {
}
console.log(data);
});
}
function bind_syndication_buttons() {
$("#syndication-container button").unbind("click").click(function(){
$(this).toggleClass('btn-info');
if(window.saveNoteState) {
saveNoteState();
}
return false;
});
}