Yesterday, I sat down and played around with the new Google Homepage API, which is interesting, in and of itself. I found the development to be most like developing a widget (for Dashboard or Konfabulator).
A couple observations:
- By default, your module is contained within a fixed height IFrame, but it’s possible to actually embed your widget straight into the Google Homepage itself.
- My first worry was over the possibility of XSS attacks, but all modules run on a different domain, gmodules.com. (I’m not sure what happens if you embed it in the page, my guess is that they’re far more restrictive, if you want your module to run free like that)
- The have a server-side proxy that’s on the same domain as the modules – which means that you can do cross-domain XMLHttpRequests – a very smart move (at least from a developers perspective, not sure about security, though).
My first test module is rather simple, it’s just the current list of links from del.icio.us popular, auto-updating every hour. To run it for yourself, go to your Google Homepage, click the ‘Add Content’ link and enter the following URL into the ‘Create A Section’ textfield:
https://johnresig.com/apps/igdel/
If you’re worried about running foreign modules on your homepage, you can feel free to look at the source code – it’s completely harmless.
The majority of the code, for the frontend of the module, was borrowed from two places:
- del.icio.us’s JSON demo – I like how they load favicons in the background, a nice touch.
- I also borrowed a little bit from the On Demand Javascript article which does dynamic-loading of foreign Javscript.
The final bit, that made this module work, I’ll discuss tomorrow – it’s a dynamic RSS to JSON convertor, that’s incredibly cool. (If you’re feeling adventurous, you can look at the module source code and find it hidden in there.)
joe (December 14, 2005 at 2:36 pm)
hmm, it doesn’t seem to be working for me.
John Resig (December 14, 2005 at 3:09 pm)
Huh, you’re right – I’m not sure what broke… I’ll check into it some more.
John Resig (December 14, 2005 at 3:15 pm)
Ah! del.icio.us has a power failure last night – and their RSS feed(s) aren’t up yet, therefore this script isn’t working yet – that’s too bad, hopefully it’ll be fixed soon.
joe (December 14, 2005 at 3:46 pm)
thanks for the update, i’ll check back when they get rss working.
Kevin (December 14, 2005 at 7:26 pm)
Looks nifty. google.com/ig is the first “homepage” I’ve found useful in awhile, in the sense that I actually use it…and it just got better :)
If I had the time to learn how I to get a module to authenticate with myRITand then Webscrape the hell out of the Financial portlet, I would so write one that told me how much flex (Tiger Bucksâ„¢ for those of you noobs) I had, how much debit I had, and maybe how much money I owed RIT.
But alas…
Anthony Graddy (December 23, 2005 at 4:46 pm)
I just wanted to let you know that you could add your homepage module to widQ.com. It is a Google Homepage Module Directory.
auto insurance allied (March 18, 2007 at 12:46 pm)
insurance progresive auto auto insurance henry’s
fobnoc (May 21, 2007 at 3:45 am)
unsecured credit card bad credit merchandise 5
erlwxmojmf (June 7, 2007 at 9:07 am)
vqtkyvp
Max (August 25, 2007 at 12:39 am)
Hi, nice very nice page..!
high yield money market account
best money market rate
[URL=http://volny.cz/highestmoney/highest-money-market-rate/]best money market[/URL]
money banking and financial market
[URL=http://www.volny.cz/businessmoney/best-money-market-account]best rate on money market account[/URL]
Good luck !
PS: do you listen Linkin Park ?
[email protected] (October 3, 2007 at 6:40 pm)
jxfs ktsfyde vwcpubnf uqkvmhx ewhivgtm lcawvbkyz bdemvr