Created
May 20, 2010 08:54
-
-
Save anonymous/407361 to your computer and use it in GitHub Desktop.
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
<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