From 81ff5d5db80824b08b4f21195d9cefba133ab745 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 22 May 2021 16:28:22 +0530 Subject: Use user-configured search engine. --- src/features/webControls/containers/WebControlsScreen.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/features/webControls/containers/WebControlsScreen.js b/src/features/webControls/containers/WebControlsScreen.js index 258b15b14..56ba60c37 100644 --- a/src/features/webControls/containers/WebControlsScreen.js +++ b/src/features/webControls/containers/WebControlsScreen.js @@ -6,6 +6,7 @@ import { autorun, observable } from 'mobx'; import WebControls from '../components/WebControls'; import ServicesStore from '../../../stores/ServicesStore'; import Service from '../../../models/Service'; +import { SEARCH_ENGINE_URLS } from '../../../config'; const URL_EVENTS = [ 'load-commit', @@ -86,7 +87,7 @@ class WebControlsScreen extends Component { if (url.match(/^((?!-))(xn--)?[a-z0-9][a-z0-9-_]{0,61}[a-z0-9]{0,1}\.(xn--)?([a-z0-9\-]{1,61}|[a-z0-9-]{1,30}\.[a-z]{2,})$/)) { url = `http://${url}`; } else { - url = `https://www.google.com/search?query=${url}`; + url = SEARCH_ENGINE_URLS[this.settings.app.searchEngine]({ searchTerm: url }); } } -- cgit v1.2.3-54-g00ecf