Add js code to parse query.