My Friend Blogroll
By Jian Shuo Wang on 2008-11-28 23:17 · ProjectsLook at this magic code. I just added this piece of code to my home page, and meanwhile, I keep a Google Spreadsheet here. At any time, I add a friend into the speadsheet, the link on my homepage gets updated immediately. You can also help yourself to add you into the list by filling in a form. After I confirm, it will be published.
- Friends
I have to say, Google Spreadsheet, and Google Docs is far beyond our imagination. I also found out that I can still write code fluently.
Below is my current friend roll:
Friendsfunction listEntries(json) { for (var i = 0; i < json.feed.entry.length; i++) { var dd = document.createElement(“dd”); var link = document.createElement(“a”); link.href= json.feed.entry[i].gsx$url.$t;link.appendChild(document.createTextNode(json.feed.entry[i].gsx$name.$t)); link.title = json.feed.entry[i].content.$t; dd.appendChild(link);document.getElementById(‘friend’).appendChild(dd); }}
Note: Above shows both pending and confirmed links, and the links on homepage only shows approved links.