huffpostlabs/highlighter.js — pull request #3 by GYatesIII (2013-03-20 02:24:49+00:00)
Title: Added in callback function and increased older browser support

In preparation for an upcoming project where I'm going to use this highlighter library (thanks, by the way) I decided to add in a callback to it. I also took the opportunity to expand on your selection save and pass that to the callback.

I also added in the minWords check to the browsers that don't support getSelection() and I tested this in modern Firefox, modern Webkit and IE7+.

I think this increases the possibilities of this library by allowing the selected text to be interacted with more easily after the selection is made.