typeahead script restore