Manage action when a link is clicked. Also added support for bookmarklet. (Fix #12)