Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
Download: https://jonathanalland.com/old-osx-projects.html

---

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. Then I rewrote it again a few months later to use the Weatherbit API after Apple bought DarkSky, and again after getting frustrated with Weatherbit.

Previous versions of this widget required you to add your own API keys, but this is no longer necessary—just download and run! (Optional instructions for adding your own key are still included in the download; it's a good thing to set up if you have a few minutes to spare.)

This widget has been explicitly tested on 10.4 "Tiger", 10.6 "Snow Leopard", 10.9 "Mavericks", and 10.13 "High Sierra", but it should run on Tiger through Mojave. Please let me know if it does not.

Please also post if you encounter problems, notice something wrong, or just find something that could be improved.
 
Last edited:

blikum

macrumors newbie
Dec 20, 2006
15
7
So far, so good. I made the background images transparent, I like the way it looks better. Once again thank you, thank you, thank you for all of the great work!

Screen Shot 2020-03-06 at 11.58.18 AM.jpg
 

Stephen.R

Suspended
Nov 2, 2018
4,356
4,747
Thailand
It's been a while since I used a Dashboard widget, but might I suggest that the credentials required for the APIs could be entered on the 'back' of the widget, where you enter your preferred location?
 

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
It's been a while since I used a Dashboard widget, but might I suggest that the credentials required for the APIs could be entered on the 'back' of the widget, where you enter your preferred location?

I thought about it. The primary issue is that including a dialog for the API key inside the UI would pretty clearly violate DarkSky's rules. By contrast, I figure there's nothing to stop me from essentially distributing source code and providing instructions on how to finish it.

I also had some design concerns about putting too many fields on the back. I didn't want to ruin Apple's design, and as-is, I fretted for a long time about how to position the DarkSky logo.
 
Last edited:
  • Like
Reactions: gdwarner

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
Oh, phew, the widget isn't broken, you’re just having trouble obtaining a key.

Can you do as they say, and try generating a key again later? Maybe they're having a server blip.
 
Last edited:
  • Like
Reactions: gdwarner

blikum

macrumors newbie
Dec 20, 2006
15
7
Seems to work fine for me, but it doesn't seem to update. Mine still says 55 and sunny outside, but it's night time and in the 30's.
 
  • Like
Reactions: gdwarner

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
Seems to work fine for me, but it doesn't seem to update. Mine still says 55 and sunny outside, but it's night time and in the 30's.

That's not good! If you search for "Weather" in the console, do any Javascript errors come up?

What happens if you reload the widget? (make sure the widget is in focus and then cmd+r)
 

blikum

macrumors newbie
Dec 20, 2006
15
7
That's not good! If you search for "Weather" in the console, do any Javascript errors come up?

What happens if you reload the widget? (make sure the widget is in focus and then cmd+r)

No errors in console. When I refresh it does fetch the current conditions. It just seems like it's not refeshing on it's own.
 

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091

Can you try changing... anything possible about the machine you use to get the keys? Different browser, different device, different network, different physical location, etc.

You'll only ever have to do this once.

No errors in console. When I refresh it does fetch the current conditions. It just seems like it's not refeshing on it's own.

Okay, so presumably the function startFetchDataTimer() isn't running. You're in Wake Forest, NC, right? Going to see if I can reproduce the problem with that location.
 

blikum

macrumors newbie
Dec 20, 2006
15
7
Can you try changing... anything possible about the machine you use to get the keys? Different browser, different device, different network, different physical location, etc.

You'll only ever have to do this once.



Okay, so presumably the function startFetchDataTimer() isn't running. You're in Wake Forest, NC, right? Going to see if I can reproduce the problem with that location.

Yes, Wake Forest, NC. Thanks for helping.
 

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
Sigh, so now another user is also having issues getting a MapQuest key. Then I did a small amount of Googling, and it looks like lots of people are having this problem:


The issues appear to have (quite coincidentally) begun yesterday. Unfortunate, but presumably they'll fix it, let's just wait a bit.

If anyone knows of a better Geocoding API, please feel free to suggest it.
 

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
Yes, Wake Forest, NC. Thanks for helping.

Huh, that location is updating for me.

There's no reason this should do anything whatsoever, but just before I go crazy—can you try restoring the original weather widget without your transparency changes, to make sure the problem still happens?

Also, what OS are you running?
 
Last edited:

blikum

macrumors newbie
Dec 20, 2006
15
7
You know what? It's working for me too now. When I got up today, it was the same temp as last night, it didn't update. I'm on 10.10.5 I'll keep an eye on it and let you know what happens.
 

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
Because MapQuest is currently having problems, please send me a PM if you need a MapQuest key. Please note:
  1. Everyone who PM's me will get the same key. Please don't abuse the key by using it elsewhere. I will need to revoke the key if usage is too high.
  2. Regardless of usage, I will revoke this key as soon as I get hear that MapQuest has fixed their problems. At this time, you will need to go through the process to acquire and add your own key, or else the widget will stop working when you next change your location.
Thanks!

Sounds like this is fixed now!
 
Last edited:

Mr_Brightside_@

macrumors 68040
Sep 23, 2005
3,803
2,175
Toronto
I was having some issues with the widget on High Sierra, but a killall Dock in a Terminal cleared them up!
No issues with my MQ API key.
 

maxx1

macrumors newbie
Mar 7, 2020
3
1
Because MapQuest is currently having problems, please send me a PM if you need a MapQuest key. Please note:
  1. Everyone who PM's me will get the same key. Please don't abuse the key by using it elsewhere. I will need to revoke the key if usage is too high.
  2. Regardless of usage, I will revoke this key as soon as I get hear that MapQuest has fixed their problems. At this time, you will need to go through the process to acquire and add your own key, or else the widget will stop working when you next change your location.
Thanks!

Can you share the MapQuest key in a public message?
Thank you!
 

Erehy Dobon

Suspended
Feb 16, 2018
2,161
2,017
No service
As of 8am PDT today Sunday 8 March 2020, the Mapquest developer site was generating API keys normally.

I generated mine and edited the JS parser file per the instructions.

The widget works great here in California.

Thanks to Wowfunhappy for his hard work!
 

Wowfunhappy

macrumors 68000
Original poster
Mar 12, 2019
1,751
2,091
Thats for catalina too?

No, sorry! This is just a modified dashboard widget that will keep receiving new weather information now that the original servers have gone down. You still need to be running an operating system that has the dashboard, aka 10.4 – 10.14. In Catalina, the dashboard is completely gone! :(
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.