Quickly grab a Street View image of your location
Keyboard Maestro: An update to Make Link With Title From Clipboard

Update a Status Board webcam image using Javascript

I wanted to add a favorite webcam to Status Board, on my iPad, but I ran into a couple of hiccups. First, you can't add an HTML module that points directly to an img file. You have to wrap the image with a complete HTML document. (Panic's support quickly confirmed this for me.)

Secondly, even though I was loading an HTML page that included the img, I found that it was not updating regularly. (As in, never.) Panic's online help suggested that a refresh isn't such a great idea, so I dusted off my javascript skills (hardly) and cooked up a simple page that reloads every 5 minutes. I also add the current time to the end of the img url to defeat any caching. The webcam ignores the bogus argument, but it ensures that I get a fresh image every time.

I've put the code in this gist, if you'd like to adapt it. Finding an explanation of how to do this simple task took a surprisingly large amount of searching.

Comments

Njpomeroy

very clever! I'll probably be using this.

The comments to this entry are closed.