Fixes delicious integration #179

This commit is contained in:
Frederic Hemberger 2011-09-26 14:19:47 +02:00
parent 167db49940
commit 40a7809d65
2 changed files with 12 additions and 2 deletions

View File

@ -1,7 +1,8 @@
{% if site.delicious_user %}
<section>
<h1>On Delicious</h1>
<script type="text/javascript" src="http://feeds.delicious.com/v2/js/{{ site.delicious_user }}?title=&amp;count={{ site.delicious_count }}&amp;sort=date&amp;extended"></script>
<div id="delicious"></div>
<script type="text/javascript" src="http://feeds.delicious.com/v1/json/{{ site.delicious_user }}?count={{ site.delicious_count }}&amp;sort=date&amp;callback=renderDeliciousLinks"></script>
<p><a href="http://delicious.com/{{ site.delicious_user }}">My Delicious Bookmarks &raquo;</a></p>
</section>
{% endif %}
{% endif %}

View File

@ -104,6 +104,15 @@ function wrapFlashVideos() {
});
}
function renderDeliciousLinks(items) {
var output = "<ul>";
for (var i=0,l=items.length; i<l; i++) {
output += '<li><a href="' + items[i].u + '" title="Tags: ' + items[i].t.join(', ') + '">' + items[i].d + '</a></li>';
}
output += "</ul>";
$('#delicious').html(output);
}
$.domReady(function() {
testFeatures();
wrapFlashVideos();