diff options
| author | Stephen Blott | 2017-11-25 11:29:21 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-25 11:29:21 +0000 |
| commit | 61bae6c7daa371d1a3b7146d46b120775d888b7c (patch) | |
| tree | 24ab087b83789096b5f4c32c8f7d3347f3b8cc6f | |
| parent | 41d8bf1483b7386e1accc5f4c5b0ea870346258a (diff) | |
| parent | 2480acdf64b690d73d2ac20ca6c865ca8d83024a (diff) | |
| download | vimium-61bae6c7daa371d1a3b7146d46b120775d888b7c.tar.bz2 | |
Merge pull request #2711 from pyarmak/master
Added UpToDate autocompletion engine
| -rw-r--r-- | background_scripts/completion_engines.coffee | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/background_scripts/completion_engines.coffee b/background_scripts/completion_engines.coffee index 0a53ad14..a6ff6dc3 100644 --- a/background_scripts/completion_engines.coffee +++ b/background_scripts/completion_engines.coffee @@ -163,6 +163,17 @@ class Qwant extends BaseEngine parse: (xhr) -> suggestion.value for suggestion in JSON.parse(xhr.responseText).data.items +class UpToDate extends BaseEngine + constructor: -> + super + engineUrl: "https://www.uptodate.com/services/app/contents/search/autocomplete/json?term=%s&limit=10" + regexps: "^https?://www\\.uptodate\\.com/" + example: + searchUrl: "https://www.uptodate.com/contents/search?search=%s&searchType=PLAIN_TEXT&source=USER_INPUT&searchControl=TOP_PULLDOWN&autoComplete=false" + keyword: "upto" + + parse: (xhr) -> JSON.parse(xhr.responseText).data.searchTerms + # A dummy search engine which is guaranteed to match any search URL, but never produces completions. This # allows the rest of the logic to be written knowing that there will always be a completion engine match. class DummyCompletionEngine extends BaseEngine @@ -183,6 +194,7 @@ CompletionEngines = [ AmazonJapan Webster Qwant + UpToDate DummyCompletionEngine ] |
