Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add other search engines #155

Open
vraravam opened this issue Dec 25, 2021 · 4 comments
Open

Add other search engines #155

vraravam opened this issue Dec 25, 2021 · 4 comments

Comments

@vraravam
Copy link

As security-minded person, it would be good to allow searching by other search engines eg DuckDuckGo.
If using DDG, the url is of the form: https://duckduckgo.com/?q=${searchTerm}

Other users I have seen also use Bing in some cases.

@vraravam
Copy link
Author

I see that there's already #151 which was closed with the comment that it won't be enhanced for other search engines. Closing this ticket.

@sindresorhus
Copy link
Owner

However, I am willing to add a generic "search" menu item. It's up to the developer to provide a title and URL with the query syntax used in Chrome: https://support.google.com/chrome/answer/95426?hl=en&co=GENIE.Platform%3DDesktop - #151 (comment)

@vraravam
Copy link
Author

However, I am willing to add a generic "search" menu item. It's up to the developer to provide a title and URL with the query syntax used in Chrome: https://support.google.com/chrome/answer/95426?hl=en&co=GENIE.Platform%3DDesktop - #151 (comment)

@sindresorhus - yes, I think that would be a good idea for the developer to provide the name and url/format of the search engine. I assume this will also take into account the i18n?

hns258 added a commit to hns258/electron-context-menu that referenced this issue Aug 12, 2022
…enu item for other search engines. Allows mutliple but requires splicing into menuTemplate (sindresorhus#155)
@hns258
Copy link
Contributor

hns258 commented Aug 24, 2022

Hoping to take a crack at this. Just wanted to check if adding an object type option, like below, would be ok? It seems to work but not sure if it's the preferred way (still relatively new to javascript).

addSearchWithOther: 
	{
		title: 'DuckDuckGo',
		url: 'https://duckduckgo.com/?q=%s'
	}

Also, still deciding on the name. Willing to change to showSearchWithOther, showOtherSearchEngine, or anything else, just wasn't sure if it might be confusing with all of the other options prefixed with show... being booleans but maybe it'll be clear enough with the readme and TS types file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@vraravam @sindresorhus @hns258 and others