ReplaceGoogleSearch: improve search engine selection (#2620)
Co-authored-by: vee <vendicated@riseup.net>
This commit is contained in:
parent
d61a930b99
commit
32c2128c5b
|
@ -13,13 +13,12 @@ import { Flex, Menu } from "@webpack/common";
|
|||
const DefaultEngines = {
|
||||
Google: "https://www.google.com/search?q=",
|
||||
DuckDuckGo: "https://duckduckgo.com/",
|
||||
Brave: "https://search.brave.com/search?q=",
|
||||
Bing: "https://www.bing.com/search?q=",
|
||||
Yahoo: "https://search.yahoo.com/search?p=",
|
||||
GitHub: "https://github.com/search?q=",
|
||||
Kagi: "https://kagi.com/search?q=",
|
||||
Yandex: "https://yandex.com/search/?text=",
|
||||
AOL: "https://search.aol.com/aol/search?q=",
|
||||
Baidu: "https://www.baidu.com/s?wd=",
|
||||
GitHub: "https://github.com/search?q=",
|
||||
Reddit: "https://www.reddit.com/search?q=",
|
||||
Wikipedia: "https://wikipedia.org/w/index.php?search=",
|
||||
} as const;
|
||||
|
||||
|
@ -55,7 +54,7 @@ function makeSearchItem(src: string) {
|
|||
key="search-text"
|
||||
id="vc-search-text"
|
||||
>
|
||||
{Object.keys(Engines).map((engine, i) => {
|
||||
{Object.keys(Engines).map(engine => {
|
||||
const key = "vc-search-content-" + engine;
|
||||
return (
|
||||
<Menu.MenuItem
|
||||
|
@ -70,7 +69,7 @@ function makeSearchItem(src: string) {
|
|||
aria-hidden="true"
|
||||
height={16}
|
||||
width={16}
|
||||
src={`https://www.google.com/s2/favicons?domain=${Engines[engine]}`}
|
||||
src={`https://www.google.com/s2/favicons?domain=${Engines[engine]}&sz=64`}
|
||||
/>
|
||||
{engine}
|
||||
</Flex>
|
||||
|
|
Loading…
Reference in a new issue