add JS's getMenu to generate menu