SelectionMenu

SelectionMenu is a small, self-contained, framework-agnostic JavaScript module that displays a custom context menu when the user selects text on the page.

The demo on this page shows that you can dynamically alter the menu based on the selection text.

This menu may offer a search feature, dictionary lookup, post to Facebook or similar.

Check out the comprehensive demo for more features.