I’d like to run some code when Discourse performs a search given a search term. This would include both when Discourse performs a search on an entry in the search input (e.g. after a pause in typing) as well as from the /search page.
I’ve tried a couple events:
search-autocomplete:after-complete (for the search performed from the dropdown input after the user pauses typing) and
page:changed (speculatively to handle a submit of /search). Neither of these are fired however for searches.