Essays


Send to Kindle

English dictionary bookmarklet for iPad

dictionary-bookmarklet

Introduction

I have been reading a lot of news and blogs with iPad. While I am more comfortable reading with this new device than with desktop or notebook computers, occasional need for looking up words on dictionary web sites leads to quite a bit of disruption because typing experience with iPad surely is not as good as with real keyboards.

So, I created a bookmarklet that would open a new tab in the web browser, and automatically search the word you had highlighted in the text. No need for typing this way.

A bookmarklet is a bookmark on the web browser just like the ones that jump to your favorites web sites. The difference is that it contains a small program written in Java Script rather than just a URL, and it can do little more than just jumping to a web site. This time, it picks up the word you highighted, and use it as the query key in opening a new web site.

How to install the bookmarklet to your iPad

1. Bookmark this page. This is a bookmarklet placeholder because iPad does not allow you to just add a Java Script as a bookmark directly. 2. Highlight and copy the following text in frame:

javascript:function%20getSelText(){var%20txt='';if(window.getSelection){txt=window.getSelection();}%20else%20if(document.getSelection){txt=document.getSelection();}%20else%20if(document.selection){txt=document.selection.createRange().text;}%20else%20return%20'';return%20txt;};var%20query=getSelText();if(query!=''){var%20load=window.open('http://i.word.com/idictionary/'+query);};
3. Edit the bookmark you created at Step 1. Rename it as you like. Then remove the URL it contained already (i.e. http://daigotanaka.org/?=220), and paste the text you copied at Step 2 instead. 4. Move the bookmarklet to Bookmarks bar as in the image on the top of this post.

This is it!

How to use Dictionary bookmarklet

Open a web page on iPad, and just highlight the word you want to look up (see the top image). Don't press the copy button. With the word highlighted, click on the bookmarket on Bookmarks bar. It should open a new page and jump to Merriam-Webster English dictionary web page with the highlighted word as the query.

Note

  • I tried this with iPhone, but it did not work because iPhone Safari does not have Bookmark bar.
  • I am not affiliated to Merriam-Webster, and if any inconvenience happens, I will change or remove this page without notice.
  • You can change the dictionary website by replacing the URL shown in red in the script as long as the query follows URL+query format. For example, to be able to use this bookmarklet on PC rather than iPad, try replacing the URL with 'http://www.merriam-webster.com/dictionary/'

Was this tip helpful?

Consider tipping me a dollar or any amount you desire. Thanks :)

Original post: June 19, 2010 | Last updated: June 19, 2010

Previous: 英和和英辞典ブックマークレット
Next: Mourning dove videos
Read more

comments powered by Disqus