Chat js as external file