Created
June 7, 2012 04:13
-
-
Save Narga/2886515 to your computer and use it in GitHub Desktop.
Show how many times your url has been added to Delicious
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
//http://www.narga.net/display-plan-text-counter-of-feedburner-delicious-and-twitter/ | |
<script type="text/javascript"> | |
//the callback -- what do we do with the json response? | |
function get_delicious_count(info) { | |
//get the number of saves | |
var num = info[0].total_posts | |
//if none, do nothing | |
if(!num) return; | |
//if some, I add the number to the end of my link, like at the top of every one of my article posts. | |
return $('delic').set({ | |
'text': $('delic').get('text') + ' (' + num + ')', | |
'title': num + ' people found this post delicious!' | |
}); | |
} | |
</script> | |
<!-- GET THE JSON DATA --> | |
<script src='http://badges.del.icio.us/feeds/json/url/data?url=http://www.narga.net/display-plan-text-counter-of-feedburner-delicious-and-twitter/&callback=get_delicious_count'></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment