Page 1 of 1

"View img title-text on click in popup" bookmarklet

Posted: Sat Nov 27, 2010 11:08 pm UTC
by scikidus
I don't think this counts under Coding, as it's not discussing implementation, it's just a bookmarklet.

A quick-and-dirty bookmarklet which displays an images title text in a popup when the image is clicked. It helps me on my iTouch when I forget about m.xkcd.com or I'm on some other comic which uses the title text.

Code: Select all

javascript:imgs=document.images;for(i=0;i<imgs.length;i++){if(imgs[i].getAttribute('title')){imgs[i].setAttribute('onclick','javascript:alert(this.getAttribute(%22title%22));')}}void(0);


Hope someone else finds this helpful :)