Universal Site Search for Arc Browser

Enables site-specific searches with shortcuts for Arc Browser or others. Efficiently handles search queries for various websites.

Aŭtoro
Cain Volfir
Ĉiutagaj instaloj
0
Tutaj instaloj
3
Ratings
0 0 0
Versio
1.0
Kreita
2024/12/08
Ĝisdatigita
2024/12/08
Licenco
MIT
Aplikiĝas al
Ĉiuj retejoj

This userscript enhances the search capabilities of the Arc Browser (or any browser that somehow doesn't support site search). It introduces custom shortcuts for site-specific searches, allowing you to directly search within your favorite websites using predefined keywords. If no shortcut is detected, the script seamlessly lets the browser handle the query as a normal search with your arc browser's default search engine.

Features:
- Site-Specific Search: Use shortcuts like @youtube or @bing to search directly within specific websites.
- Normal Search Handling: If no shortcut is detected, the browser processes the query as usual without interference.
- Customizable Shortcuts: Personalize shortcuts for your preferred search engines or websites.
- Fast and Lightweight: Executes efficiently without affecting browser performance.

Usage Instructions:
1. Install Tampermonkey (or a similar userscript manager) in your browser.
2. Add this script to your userscript manager via its dashboard.
3. Save and activate the script.
4. Use the browser's search bar to type your queries:
- To search within a specific site, start your query with a shortcut (e.g., @youtube cats).
- For normal searches, type without using any shortcut (e.g., cats).

How to Add a Custom Search Engine:
1. Open the script in your userscript manager.
2. Locate the searchEngines array near the top of the script.
3. Add a new object to the array with the following format:
{ shortcut: '@yoursite', url: 'https://example.com/search?q=%s' }
- Replace @yoursite with your desired shortcut (e.g., ':r', '.r', '@r', etc).
- Replace https://example.com/search?q=%s with the search URL of the website you want to add.
- Ensure %s is included in the URL where the search query should go.
- If you want to add more custom search engine, don't forget to add ',' after the '}'
4. Save the changes to the script.

E.g. to add reddit search :
{ shortcut: '@reddit', url: 'https://www.reddit.com/search/?q=%s' }

Precautions:
- Do Not Add Your Default Search Engine: Avoid adding your browser's default search engine (e.g., Google) as a shortcut. Doing so may cause redirect loops.
- Unique Shortcuts: Ensure that shortcuts are unique and do not conflict with regular search terms to avoid unintended behavior.-
- Syntax Requirement: Always include a space after the shortcut (e.g., @youtube cats) for the script to recognize it correctly.