Style changes and improvements in autocomplete
This commit is contained in:
parent
b9d7743e5a
commit
4af983ed90
10 changed files with 135 additions and 93 deletions
|
@ -5,6 +5,8 @@ import 'whatwg-fetch';
|
|||
const DDG_REGEX = /\/ddg\s+(.+)$/;
|
||||
const REFERER = 'vector';
|
||||
|
||||
let instance = null;
|
||||
|
||||
export default class DuckDuckGoProvider extends AutocompleteProvider {
|
||||
static getQueryUri(query: String) {
|
||||
return `http://api.duckduckgo.com/?q=${encodeURIComponent(query)}`
|
||||
|
@ -51,4 +53,11 @@ export default class DuckDuckGoProvider extends AutocompleteProvider {
|
|||
getName() {
|
||||
return 'Results from DuckDuckGo';
|
||||
}
|
||||
|
||||
static getInstance(): DuckDuckGoProvider {
|
||||
if(instance == null)
|
||||
instance = new DuckDuckGoProvider();
|
||||
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue