add JS api to index.html