diff options
author | Aaron Parecki <aaron@parecki.com> | 2014-09-07 11:48:52 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2014-09-07 11:48:52 -0700 |
commit | cf8ecf1fc9942dc00f0a5a11b313f8babbc9c3cd (patch) | |
tree | af6a3e99b19383ea5642f530451ff450072a9345 /views/partials/syndication-js.php | |
parent | 9cfa0ff2c18e25a9c00d80624e6abea487bd9136 (diff) |
adds bookmark posting interface with bookmarklet. now any URL can auto-login given a login token.
Diffstat (limited to 'views/partials/syndication-js.php')
-rw-r--r-- | views/partials/syndication-js.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/views/partials/syndication-js.php b/views/partials/syndication-js.php new file mode 100644 index 0000000..bd657f3 --- /dev/null +++ b/views/partials/syndication-js.php @@ -0,0 +1,24 @@ + +function reload_syndications() { + $.getJSON("/micropub/syndications", function(data){ + if(data.targets) { + $("#syndication-container").html('<ul></ul>'); + for(var i in data.targets) { + var target = data.targets[i].target; + var favicon = data.targets[i].favicon; + $("#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>'); + } + bind_syndication_buttons(); + } else { + + } + console.log(data); + }); +} + +function bind_syndication_buttons() { + $("#syndication-container button").unbind("click").click(function(){ + $(this).toggleClass('btn-info'); + return false; + }); +} |