Skip to content

Instantly share code, notes, and snippets.

Created May 20, 2010 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/407361 to your computer and use it in GitHub Desktop.
Save anonymous/407361 to your computer and use it in GitHub Desktop.
<tr>
<td bgcolor="#FFFFFF">
<!-- Experiment with Buzz posts on home page -->
<div id="content">
<span class="listHead"> Recent posts from <a href="http://www.google.com/profiles/adewale#buzz">my Google Buzz account</a></span>
</div>
<script>
function handleResponse(response) {
for (var i = 0; i < 5; i++) {
var item = response.data.items[i];
//TODO(ade) Escape the titles.
// In production code, item.title should have the HTML entities escaped.
document.getElementById("content").innerHTML += "<span class='listItem'><a href='" + item.links['alternate'][0]['href'] + "'>" + item.title + "</a></span>";
}
}
</script>
<!-- Use the numeric identifier rather than my explicit username so that it doesn't give away my email address-->
<script src="https://www.googleapis.com/buzz/v1/activities/105037104815911535953/@public?alt=json&callback=handleResponse"></script>
</td>
</tr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment