Fast Longman Dictionary lookup bookmarklet

Longman has recently made available online the almost complete version of their Dictionary of Contemporary English. For anyone who doesn’t know or haven’t got a chance to try out yet, Longman Dictionary of Contemporary English is a very comprehensive document; it includes not only English definition of a word, but also packed with several example sentences (which is often the best way to learn how to use a new word). I found this particularly useful for anybody who want to improve their English.

The only convenience remained is you have to go to their homepage every time you look up a word.  Kinda time-consuming isn’t it?

So I wrote a small javascript bookmarklet to make my life easier: just enter a word in the prompt box then press OK and its English definition will show up in a new tab of your browser.

javascript:(function(){var word=prompt("Enter a word to look up","");word = word.trim();if (word!=null && word!=""){var url="http://www.ldoceonline.com/search/?q=";url += word;if ( document.location.href.indexOf("ldoceonline.com")<0){window.open(url,'_newtab');}else{window.location = url;}}})()

Just select all the piece of code above, drag it to your bookmark bar, then change its name to what you like (for example, “Fast Lookup”). And That’s it! 🙂
Click on that bookmark whenever you want to look up a word.

Select all the code

Drag it to your bookmark bar & right click to change name


The Result

Have fun learning!!

Advertisements

3 Comments

Filed under Software

3 responses to “Fast Longman Dictionary lookup bookmarklet

  1. daddy

    I would appreciate if there is sthing like highlight~~>right-mouse ~~>(click)~~>meaning
    would be more convenient

  2. I gave that idea some thoughts when I wrote the script.
    But I didn’t do it that way because of a few reasons:
    First, I found it quite annoying having an entry in the right-click menu.
    Second, It would take considerable amount of time to code that feature (which I don’t really want to spend too much time working on)
    Third, it won’t work cross-browser (Internet explorer, Chrome, Firefox.. )
    So, the small javascript code which was written in 5 mins has proved to be the best option. 🙂

  3. After I initially left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and now
    each time a comment is added I get 4 emails with the exact same comment.
    There has to be a means you can remove me from
    that service? Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s