Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Simple script to add word definitions to your text content
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

defineme.js (inspired by hijs) is a simple script to add word definitions from external service to your text content.


Imagine you have a text on Einstein & physics and you want to add relevant links to wikipedia on a few words. To do that add at the end of your html body the configuration and the embedded script like so:

    window.defineme = {selector: 'p', url: '', words: 'einstein physics cosmology'}

and straight after

<script src="defineme.js"></script>


The defineme global object contains three parameters for configuration.

  • selector: name of the HTML tag(s) element(s) where the content will be parsed
  • url: existing url for dictionnary or encyclopedical service. The token %s is will be replaced by the word for its definition
  • words: space separated list of words that will be linked to external service

Exemples of url for external services for word definitions are:

Something went wrong with that request. Please try again.