js update sidebar and page title's unread counter