Quickly add callback functions for user-highlighted text with JavaScript.