Skip to content

Instantly share code, notes, and snippets.

@oliviagallucci
Last active July 9, 2023 01:27
Show Gist options
  • Save oliviagallucci/62b89d6300a5f199d0e9ddaff0ff4025 to your computer and use it in GitHub Desktop.
Save oliviagallucci/62b89d6300a5f199d0e9ddaff0ff4025 to your computer and use it in GitHub Desktop.
Definitions Bookmarklet - Select a word on a webpage, click the bookmarklet, and a new tab with Google's definition of the word will appear
javascript:d=""+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);d=d.replace(/\r\n|\r|\n/g,"%20,");if(!d)d=prompt("Enter%20Word:",%20"");if(d!=null)location="http://www.google.com/search?q=define:"+escape(d).replace(/%20/g,"+");void(0);
@oliviagallucci
Copy link
Author

oliviagallucci commented Jul 9, 2023

If you want to use a different dictionary, replace http://www.google.com/search?q=define: and the formatting past it with the code needed to use your dictionary. Alternatively, you can search the internet to see if someone created one with your desired dictionary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment