Wednesday, October 27, 2010

Google Maps - Transit Bookmark

Google Maps now has bus route and schedule information for GRT, which is pretty handy, particularly for factoring in walking times and coordinating multiple busses. It often points out alternative routes/connections I hadn't thought of that are faster or more convenient.

The integrated Google Maps app for IOS is nice, but the interface feels a bit awkward or backwards to me for some tasks. For figuring out bus routes and schedules, there's some advantages to Google's mobile web interface.

However: getting to that interface still requires some annoying navigation when what I really want to be able to do is just quickly and directly ask, "if I want to take a bus to [here], what are my options?"

So I hacked together a bookmark that lets me do exactly that. Here's the link, or you can copy and paste:

http://maps.google.com/maps/m?gl=ca#ll=0,0&saddr=&daddr=&ttype=now&dirflg=r&ac=t,

You can also open that link and then add it to your home screen for quick access.

This bookmark jumps you straight to the form to enter your destination, with public transit set as your mode of transportation. There's a handy "leaving now / depart at / arrive by" option right there, too. On my iPhone, the starting address always defaults to "current location", but not always when I test it on my desktop... there's something funny about the geolocation request it performs, and if it silently fails or doesn't get an answer in time it will just leave a blank field as the starting point. (The iPhone, with its GPS, seems immune to this problem.)

Friday, October 22, 2010

Title Text Bookmarklet

A lot of webcomics include an extra punchline or commentary inside the title or alt text for the comic, which displays when you let the mouse cursor hover over the image for a couple seconds.

On a touchscreen device, you can't hover. So: bookmarklet to the rescue! I'm not the first to come up with this idea, but I didn't like the style or function of the existing ones that I could find.

I did like the style of Andy Allcorn's QwantzReveal bookmarklet, which is filling this same function, but it is very specific to the easter eggs for Ryan North's Dinosaur Comics. I wanted something that could work for more webcomics but use the same style.

So, I grabbed the code for that and chiselled away at it until I had something that works reasonably well for the webcomics I'm likely to use it with.

The result: Copy this link into a bookmark!

Running the bookmarklet will make an overlay fade in on top of the comic image, showing both the alt and/or title (whatever exists). Tapping it will cause the overlay to fade away, leaving the comic as it was. (Unless the comic is linked to something else, then it will follow the link.)

Identifying which (if any) image in the page is the comic is a rough hack but it seems to work for the comics I read (including Overcompensating, The Adventures of Dr. McNinja, XKCD and Achewood (but not via Assetbar)). It doesn't work for A Softer World, but you can already just tap on the comic there to see the title text.

Let me know if (a) there's any comics this ought to work on, but doesn't, and (b) any situations where it mangles the page layout or doesn't display nicely over the image.

EDIT: Alternately, select all from the follow text area and copy it:

then create a bookmark, edit it, and paste what you copied in place of the URL.