diff options
Diffstat (limited to 'background_scripts')
| -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  ] | 
