An open API service indexing awesome lists of open source software.

https://github.com/vergissberlin/opensearch-example

Example for OpenSearch protocol 1.1
https://github.com/vergissberlin/opensearch-example

opensearch opensearch-plugins

Last synced: 2 months ago
JSON representation

Example for OpenSearch protocol 1.1

Awesome Lists containing this project

README

        

# OpenSearch protocol 1.1 example

This is an example of a [OpenSearch API](https://developer.mozilla.org/en-US/docs/Web/OpenSearch). You can use it for the search in your browser.

![Demo](https://res.cloudinary.com/practicaldev/image/fetch/s--wWHHSWdF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n89wqmafn53ubh1fp6b7.gif)

## Testing

To test the changes locally, you need a secure URL pointing to our localhost environment (aka tunnelling). Feel free to use any tool you know, I can recommend ngrok or localtunnel. You can find other options on this blog post.

### Chrome and Safari

Visit the secure URL on your browser
Refresh the page - the browser has read the link tag and indexed it
Type the URL again and the search shortcut should be available

### Firefox

Firefox requires you to manually index the site as a search engine. The different ways to do it are described in their documentation.

---

## Links

- [MDN](https://developer.mozilla.org/en-US/docs/Web/OpenSearch)
- [Chrome manifest.json](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/chrome_settings_overrides#example)
- [GitHub Repoistory](https://github.com/dewitt/opensearch)
- [How to](https://dev.to/arthurdenner/how-to-implement-a-search-shortcut-opensearch-on-any-website-3e9i)
- [Sad story](https://9to5google.com/2022/03/18/chrome-site-search-activate/)