Modified from
Carrot's share-button project