moved js code in pgn-parser.html