The Weather dashboard widget that ships with Mac OS X 10.4 – 10.14 broke in 2019, when the APIs it uses went offline. Luckily, the widget is all just editable Javascript code, so I rewrote a portion of the code to use the freely-accessible DarkSky and MapQuest APIs.
Here's my modified widget. It requires a small amount of setup:
- Download and extract the attached file.
- Right click
Weather.wdgt
and select Show Package Contents
.
- Open the file
weatherParser.js
in a text editor.
- Make accounts at DarkSky and MapQuest to get API keys for each service.
- Paste your API keys into the quotes at the top of the file you opened. When you're done, the beginning of the file should look something like this:
Code:
// https://darksky.net/dev
var darkSkyApiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
// https://developer.mapquest.com/user/me/plan
var mapQuestApiKey = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
//-------------------------------------------------------------------------------------
- Go ahead install the modified widget, either by double-clicking
Weather.wdgt
(recommended), or by replacing Apple's original version in /Library/Widgets/
(if having two copies on your machine would offend your sensibilities).
Possible weather conditions in this version are
clear
,
partly cloudy
,
rain
,
snow
,
rain & snow
,
flurries
,
wind
,
fog
,
lightning
, and
freezing rain
. This leaves out a few that were in the original (haze, sun-shower, etc.), but the DarkSky API doesn't offer such granularity. This mod would not have been possible without the DarkSky API, so please consider buying one of
DarkSky's mobile apps to reward their work.
Please post if you encounter problems, notice something wrong, or just find something that could improved.
Some additional tidbits:
- This widget is compatible with OS X 10.9 "Mavericks" – 10.14 "Mojave". If you're on 10.8 and below and have access to a web server, follow these instructions to get the widget working.
- If you manage to see
Freezing Rain
or Lightning
, let me know. I did a bit of a hack to make those work, and I haven't yet managed to find a location with the right weather forecast to test them properly. Likewise, if it's clearly thunder-storming outside and the widget just shows rain, please check the forecast on DarkSky.net to see if it matches the widget, and let me know if something is off.