diff options
author | 2021-05-22 16:28:22 +0530 | |
---|---|---|
committer | 2021-05-22 16:29:43 +0530 | |
commit | 81ff5d5db80824b08b4f21195d9cefba133ab745 (patch) | |
tree | ecd470755afec5d88540a02521109993449ba5c7 /src/features/webControls/containers | |
parent | Expose recipe version in 'Settings' dialog while adding or editing a service.... (diff) | |
download | ferdium-app-81ff5d5db80824b08b4f21195d9cefba133ab745.tar.gz ferdium-app-81ff5d5db80824b08b4f21195d9cefba133ab745.tar.zst ferdium-app-81ff5d5db80824b08b4f21195d9cefba133ab745.zip |
Use user-configured search engine.
Diffstat (limited to 'src/features/webControls/containers')
-rw-r--r-- | src/features/webControls/containers/WebControlsScreen.js | 3 |
1 files changed, 2 insertions, 1 deletions
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'; | |||
6 | import WebControls from '../components/WebControls'; | 6 | import WebControls from '../components/WebControls'; |
7 | import ServicesStore from '../../../stores/ServicesStore'; | 7 | import ServicesStore from '../../../stores/ServicesStore'; |
8 | import Service from '../../../models/Service'; | 8 | import Service from '../../../models/Service'; |
9 | import { SEARCH_ENGINE_URLS } from '../../../config'; | ||
9 | 10 | ||
10 | const URL_EVENTS = [ | 11 | const URL_EVENTS = [ |
11 | 'load-commit', | 12 | 'load-commit', |
@@ -86,7 +87,7 @@ class WebControlsScreen extends Component { | |||
86 | 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,})$/)) { | 87 | 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,})$/)) { |
87 | url = `http://${url}`; | 88 | url = `http://${url}`; |
88 | } else { | 89 | } else { |
89 | url = `https://www.google.com/search?query=${url}`; | 90 | url = SEARCH_ENGINE_URLS[this.settings.app.searchEngine]({ searchTerm: url }); |
90 | } | 91 | } |
91 | } | 92 | } |
92 | 93 | ||