add gitignore and fix small js bug