chiark / gitweb /
doxygen: make it possible to search directly from browser URL bar.
Adds an ability to specify search query by adding ?q={query}#search
to URL, which can be then bookmarked in the browsers to provide search
directly from the URL bar (or search input field).
On browsers supporting OpenSearch discovery (Firefox, Chrome, probably
Edge too), it also provides metadata that allow "single-click" addition
of the search engine to browser's search engine list. This option is
unfortunately well-hidden in the current versions (Firefox has it in the
three-dots menu, in Chrome you need to go to Settings while being on
this page and then it shows a suggestion, wtf). The OpenSearch metadata
are provided through a new opensearch.xml file and referenced from page
<head>. OpenSearch also supports autocompletion and search directly from
browser address bar, but for that to work I would need to implement a
server-side search functionality. Not yet, since I don't have any
immediate plans to turn my cloud file-serving Apache installation into a
smart and vulnerable attack target.
This also wraps the input in a <form>, so browsers not supporting
OpenSearch discovery (Vivaldi) can still add the search engine by
right-clicking on the input field. This works in Firefox as well.
Also, because of the <form> added, Vivaldi started autocompleting crap
suggestions for me, so I had to explicitly disable that.
15 files changed: