Refractoring Every single feature and ADDING ALOT of functionalities so Theo don't have to work and can sleep with Unduck#138
Open
Coder-soft wants to merge 9 commits intoT3-Content:mainfrom
Open
Conversation
Users can now add custom search engines via the UI, which are stored in localStorage and included in the engine dropdown. The main page and search redirect logic have been updated to prioritize custom engines, and related styles and tests have been added. Also, new scripts for testing and .gitignore updates for test/config files.
Deleted the instructions block from the main page render and removed related CSS styles. This streamlines the interface and cleans up unused styling.
Integrates Supabase for storing and suggesting search history, including new environment variables, migration, and setup files. Updates UI with new fonts, dark theme, improved search form, suggestions, and settings panel. Adds Perplexity bang and refactors styles for a modern look.
Sets workbox.maximumFileSizeToCacheInBytes to 3MB in VitePWA config to allow caching of larger files in the service worker.
Initial commit of a Chrome extension that replaces the default new tab page with unduckcustom.vercel.app. Includes manifest, icons, newtab HTML, and documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unduck-Custom Search Engine Features
Features
1. Domain-Agnostic Functionality
The tool now works from any domain, not just unduck.link. The URL displayed in the interface automatically adapts to the current domain, making it easy to use the tool from different locations.
2. Built-in Search Engines
Users can select from 10 popular search engines as their default:
g)d)b)y)ya)e)sp)q)br)m)3. Custom Search Engines
Users can add their own custom search engines with:
{{{s}}}as the placeholder for search queries4. Bang Redirects
Full compatibility with DuckDuckGo's bang system is maintained. Users can still use any of the thousands of available bangs by prefixing their search with
!followed by the bang identifier.5. Search Priority
The search logic follows this priority order:
How It Works
Setting Your Default Search Engine
Using Bang Redirects
!gh unduck!ghwithout a query, you'll be taken directly to github.comAdding Custom Search Engines
{{{s}}}for the search query (e.g.,https://example.com/search?q={{{s}}})!mce search terms)Technical Implementation
Storage
User preferences and custom engines are stored in the browser's localStorage:
default-engine: The user's selected default search engine bangcustom-engines: An array of user-defined search enginesSearch Logic
When a search is performed:
Domain Agnosticism
The tool uses
window.location.originto dynamically generate the correct URL for any domain, ensuring it works regardless of where it's hosted.Chrome Extension
Simple Chrome extension to use unduck as the default search engine
Testing
The implementation includes comprehensive automated tests covering:
All tests are passing, ensuring the reliability of the implementation.