Share fundtion in viewer