You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-18 09:22:18 +03:00
Style changes and improvements in autocomplete
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user