Wednesday, January 25, 2006

W32T trickery part 1: adding functionality with bookmarklets

I recently bought Toshiba's W32T keitai, which comes, among other things, with Opera 7.60 (aka PCサイトビューアー) preinstalled. Great browser, decent speed and all that, but it is not capable of copying the text or downloading the images you see on your screen. Luckily, as the Opera browser is JavaScript enabled, bookmarklets come to our rescue - here are the ones I find invaluable (also usable on other PCサイトビューアー enabled keitai, such as W31T, W21CA/W21CAII, etc.):

  1. Plain text popup = allows you to copy any webpage's text:
    javascript:prompt('',document.body.innerText); 
  2. View the current page in the EZ browser (aka Openwave Mobile Browser 6.2) = gives more content manipulation possibilities, but comes with rather strict size limits:
    javascript:location.href='device:ezweb?url='+location.href
  3. View all images on 1 page and optionally view each image separately in the EZ browser = images can be saved, as long as they're not too big:
    javascript:(function(){var d=document,a=d.images,i; for(i=0;i<a.length; i++){ d.write('<a href="device:ezweb?url='+a[i].src+'"><img src="'+a[i].src+'"></a>');} d.write('<hr><a href="'+location.href+'">back</a>');d.close();})();
  4. View all images on 1 page and optionally resize each image on the fly = any image can be resized and saved in the EZ browser:
    javascript:(function(){var d=document,a=d.images,i; for(i=0;i<a.length; i++){ d.write('<a href="device:ezweb?url=http://tama.s68.xrea.com/ezch/resize.php?url='+a[i].src+'"><img src="'+a[i].src+'"></a>');} d.write('<hr><a
    href="'+location.href+'">back</a>');d.close();})();

Credit where credit is due: bookmarklet 1 and 4 come almost straight from ayati.com, while 2 and 3 are variations on the same theme.

Quick explanation how to use the code snippets above: make a new bookmark in your PCサイトビューアー and copy the javascript:... string you find above to the field where you would otherwise put http://www.... Activating the bookmarklets' functionality is easy: navigate to a webpage of choice, and simply select the bookmarklet you want to use.

1 Comments:

Anonymous Paul said...

Excellent, bookmarklets for keitais. lol. those seem pretty useful, thanks for sharing that!

January 25, 2006 10:33 AM  

Post a Comment

Track with Technorati
Track with Google Blog Search

<< Home