[md] modified js for history/shared file view