Clean the gh-pages JS and fix loading bug