Added javascript for handling sharing.