Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:407361
Created May 20, 2010

What would you like to do?
<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