diff --git a/src/components/modals/main/settings/sections/Keybinds.jsx b/src/components/modals/main/settings/sections/Keybinds.jsx index 72097b6a..4467c190 100644 --- a/src/components/modals/main/settings/sections/Keybinds.jsx +++ b/src/components/modals/main/settings/sections/Keybinds.jsx @@ -45,7 +45,7 @@ export default class KeybindSettings extends PureComponent { } reset(type) { - let keybinds = this.state.keybinds; + const keybinds = this.state.keybinds; keybinds[type] = ''; localStorage.setItem('keybinds', JSON.stringify(keybinds)); this.setState({ diff --git a/src/components/widgets/search/Search.jsx b/src/components/widgets/search/Search.jsx index 688b1f67..795334c6 100644 --- a/src/components/widgets/search/Search.jsx +++ b/src/components/widgets/search/Search.jsx @@ -130,7 +130,7 @@ export default class Search extends PureComponent { } } - setSearch(name) { + setSearch(name, custom) { let url; let query = 'q'; const info = searchEngines.find((i) => i.name === name); @@ -142,6 +142,10 @@ export default class Search extends PureComponent { } } + if (custom) { + url = localStorage.getItem('customSearchEngine'); + } + this.setState({ url: url, query: query, @@ -165,23 +169,27 @@ export default class Search extends PureComponent { } render() { + const customText = window.language.modals.main.settings.sections.search.custom.split(' ')[0]; + return (