Displaying Image Hints on an iPhone

Recently it has come to my attention that there is no way to view hints on images on an iPhone.

Normally on any modern desktop web browser when you hover your mouse cursor over an image, a hint if provided will be displayed. Certain websites use these hints to comedic effect, and it’s a shame you can’t see them.

Fortunately i have come up with a nice and simple bookmarklet to solve this issue. Simply add it to your bookmarks in Safari, sync over to your iPhone and run the bookmarklet.

Simply genius!

To view a hint, simply hold down two fingers over an image. The associated hint will be displayed in a pop-up alert.

REXML could not parse this XML/HTML: 
<a href="javascript:function%20registerImg(img)%20{var%20timer%20=%20null;function%20ts(e)%20{if%20(e.touches.length%20<%202)return;e.preventDefault();timer%20=%20setTimeout(function(){alert(img.getAttribute(%22title%22));},500);}function%20te(e)%20{e.preventDefault();clearTimeout(timer);}img.ontouchstart%20=%20ts;img.ontouchend%20=%20img.ontouchcancel%20=%20te;}var%20i,imgs%20=%20document.querySelectorAll(%22img%22);for%20(i=0;i<imgs.length;i++)%20registerImg(imgs[i]);">Drag this link</a>

Or you can check out the full code in this gist.