Javascript changes to make mark as read/unread work.