mmontag / chip-player-js

Web-based music player for a variety of video game and chiptune music formats.
https://chiptune.app
GNU General Public License v3.0
324 stars 17 forks source link

Add opensearch/omnibox integration #147

Open mmontag opened 4 months ago

mmontag commented 4 months ago

Allow chiptune.app searches directly from Chrome Omnibox.

https://developer.mozilla.org/en-US/docs/Web/OpenSearch

HTML:

...
<link rel="search" type="application/opensearchdescription+xml" 
      title="Chiptune.app Search" href="/xml/opensearch.xml">
...

opensearch.xml:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  <ShortName>[SNK]</ShortName>
  <Description>[Search engine full name and summary]</Description>
  <InputEncoding>[UTF-8]</InputEncoding>
  <Image width="16" height="16" type="image/x-icon">[https://example.com/favicon.ico]</Image>
  <Url type="text/html" template="[searchURL]"/>
  <Url type="application/x-suggestions+json" template="[suggestionURL]"/>
  <moz:SearchForm>[https://example.com/search]</moz:SearchForm>
</OpenSearchDescription>