Mirror of Quill
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
755 B

  1. function reload_syndications() {
  2. $.getJSON("/micropub/syndications", function(data){
  3. if(data.targets) {
  4. $("#syndication-container").html('<ul></ul>');
  5. for(var i in data.targets) {
  6. var target = data.targets[i].target;
  7. var favicon = data.targets[i].favicon;
  8. $("#syndication-container ul").append('<li><button data-syndication="'+target+'" class="btn btn-default btn-block"><img src="'+favicon+'" width="16" height="16"> '+target+'</button></li>');
  9. }
  10. bind_syndication_buttons();
  11. } else {
  12. }
  13. console.log(data);
  14. });
  15. }
  16. function bind_syndication_buttons() {
  17. $("#syndication-container button").unbind("click").click(function(){
  18. $(this).toggleClass('btn-info');
  19. return false;
  20. });
  21. }