Read messages with js