When we type the URL into the browser and press "TAB", a search box will pop up in the navigator if the site supports OpenSearch.
wiki refs: https://en.wikipedia.org/wiki/OpenSearch
I believe it is not difficult to do, meanwhile it is very useful.
Have a look at: https://ponyfoo.com/articles/implementing-opensearch
There are two steps to build this function if I get it all right:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Misskey Search</ShortName>
<Description>Search everything in Misskey</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image height="16" width="16" type="image/x-icon">some://path/to/favicon.ico</Image>
<Url type="text/html" method="get" template="https://example.misskey.com/search?q={searchTerms}" />
</OpenSearchDescription>
<link rel='search' type='application/opensearchdescription+xml' title='Open Search' href='openSearch.xml' />
👀
I did not know about OpenSearch. Looks like a great feature!
Thanks for letting me know that, Misskey will support OpenSearch soon✌️
Most helpful comment
I did not know about OpenSearch. Looks like a great feature!
Thanks for letting me know that, Misskey will support OpenSearch soon✌️