feat(completions): add wikipedia-simple

Add omnibar completions for the "simple" version of Wikipedia -
https://simple.wikipedia.org/wiki/Wikipedia:Simple_English_Wikipedia
This commit is contained in:
Maddison Hellstrom 2018-08-23 02:50:39 -07:00
parent e373015d0a
commit 2550c3f4db
2 changed files with 10 additions and 1 deletions

View File

@ -23,7 +23,7 @@ This is my personal configuration for the wonderful [SurfingKeys](https://github
#### Bundled Search Engine Completions
There are currently 43 Search Engine auto-completions.
There are currently 44 Search Engine auto-completions.
You can access a Search Engine auto-completion by pressing the search leader key, which is `a` by default, followed by the search engine alias.
@ -72,6 +72,7 @@ For example, to open the Wikipedia completion, you would type `awp` while in nor
| `vw` | `vimwikia` | `vim.wikia.com` | |
| `wa` | `wolframalpha` | `www.wolframalpha.com` | [:framed_picture:](#wolframalpha) [:framed_picture:](#wolframalpha-2) |
| `wp` | `wikipedia` | `en.wikipedia.org` | |
| `ws` | `wikipedia-simple` | `simple.wikipedia.org` | |
| `yp` | `yelp` | `www.yelp.com` | |
| `yt` | `youtube` | `www.youtube.com` | [:framed_picture:](#youtube) |

View File

@ -344,6 +344,14 @@ completions.wp.callback = response => Object.values(JSON.parse(response.text).qu
)
})
// Wikipedia - Simple English version
completions.ws = {
alias: "ws",
name: "wikipedia-simple",
search: "https://simple.wikipedia.org/w/index.php?search=",
compl: "https://simple.wikipedia.org/w/api.php?action=query&format=json&generator=prefixsearch&prop=info|pageprops%7Cpageimages%7Cdescription&redirects=&ppprop=displaytitle&piprop=thumbnail&pithumbsize=100&pilimit=6&inprop=url&gpssearch=",
callback: completions.wp.callback,
}
// WolframAlpha
completions.wa = {