Note: This is for users who use Brave Search or any other search that is not present in the supported search engines below.
The only change from the other userscript is that Brave search shortcut is removed from here. This is because userscript won't work if any of the search engines in the userscript is set as default.
Here's the other version for users with Google search engine as default:
Site Search for Google Users
For users who have any of the below search engines as default, you will have to manually edit the userscript and remove the search engine from the domains and searchEngines list.
You can leave any feedback if you want some improvements or if there are issues, and I may take a look at it.
Features
- Instant redirection to search results
- Multiple search engines support
- Easy to customize and extend
Supported Search Engines
Shortcut |
Site |
@perplexity |
Perplexity AI |
@g |
Google |
@youtube |
YouTube |
@morphic |
Morphic |
@qwant |
Qwant |
@phind |
Phind |
@yandex |
Yandex |
Usage
- Install a userscript manager (like Tampermonkey)
- Install this userscript
- In any search box, type a shortcut followed by your search query
- Example:
@perplexity how to make pasta
- Example:
@youtube funny cats
- Example:
@phind javascript arrays
The script will instantly redirect you to the corresponding search engine with your query.
Customization
Adding a New Search Engine
- Open the userscript
- Find the
searchEngines
array
- Add a new entry following this format:
javascript
{
shortcut: '@example',
url: 'https://example.com/search?q=%s'
}
- Add the domain to the
searchDomains
Set:
javascript
const searchDomains = new Set([
'example.com',
// other domains...
]);
Removing a Search Engine
- Remove its entry from the
searchEngines
array
- Remove its domain from the
searchDomains
Set
Important Note About Default Search Engines
⚠️ Do not add your browser's default search engine to the script. This can cause redirect loops because:
- When you search, your browser first redirects to your default search engine
- The script then tries to redirect from there
- This creates a conflict and breaks the functionality
For example, if you use Brave Search as your default search engine, don't add the @brave
shortcut to the script.
Query Parameter Support
The script supports various search query parameters:
q
(most search engines)
search_query
(YouTube)
text
(Yandex)