The Web Realm
     Marc Chadwick's Weblog
 Local: Home About Contact
Wishlists: Books DVDs Thinkgeek 
Syndicate: RSS RSD Atom

 More Weather Widget Hacking
Hacks 

Not long ago I directed my readers (that's you) to a well detailed hack to tell the Weather widget that ships with Dashboard to show you the last time it updated. That solved one of my two big problems with the widget.

The other problem was a little bit more confusing. For longer city names, such as mine, I found it far more difficult to locate the clickable sweet spot on the city name that was linked to the AccuWeather website. Then I had an idea. It's just HTML and JavaScript, right? Well why not make something else clickable?

It seemed to me that the next logical thing to make clickable was the temperature. I looked through Weather.html and found a line that read:


<div id='temperature'>--</div>

I altered that line to read:


<div id='temperature' onclick='goToAccuWeather(event);'>--</div>

After opening a new copy of the Widget I found the temperature to be clickable.

Please remember, backups are your friend. As was suggested in the original hint, I recommend that you make a copy of Apple's original widget (found in /Library/Widgets) in your own local widget directory (~/Library/Widgets). The one in your home directory will replace the default one in the Dashboard bar, and you will have a pristine backup just incase.

 Comments:

Leave a comment

 

February 2008
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29  


Recent Entries
# links for 2008-02-10
# Biofuels Do More Harm Than Good
# del.icio.us
# That'll do it
# Under Construction
# Revamp
# GooSync
# Trusting Google
# Play AACs on your TiVo with TiVo Desktop from a Mac
# My Once and Future Cloud
Flickr Photostream
www.flickr.com
Categories
Apple
Aquarium
Banking
Blog Stuff
Bookmarks
Books
Boston
Comedy
Comics
Development
Drama
Entertainment
For the Mac
Hacks
Hardware
In The News
Internet
Linux
Mobile Phones
Movies
Music
Open Source
OS X
Politics
Red Sox
Science
Security
Software
Sports
Stuff 'n Junk
Sysadmin Stuff
Technology
Television
Testing
Thoughts
UNIX
Vermont
Virii
Windows
Tags
blog  cloud  development  bookmarks  google  code  email  global warming  gmail  google calendar  news  organization  politics  science  study  symbian  tags  test  web 2.0 
Archives
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
March 2007
February 2007
January 2007
December 2006
November 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
Guest Posts
Blog for America
Boston Metroblogs
Links
802 Online
Blog for America
Boston Metroblogs
Dream Theater Info Network
Dr. Mosh
Engadget
Gizmodo
Lukwam
Mac OS X Hints
The Register
SAGE
Skadz
Slashdot
Kevin Smith
Powered by Movable Type Publishing Platform
This blog is licensed under a Creative Commons License.