Skip to content

Add Search Engine Switcher with Keyboard Shortcuts#95

Open
Ishratnoori wants to merge 2 commits into
Nainish-Rai:mainfrom
Ishratnoori:feature/search-engine-switcher
Open

Add Search Engine Switcher with Keyboard Shortcuts#95
Ishratnoori wants to merge 2 commits into
Nainish-Rai:mainfrom
Ishratnoori:feature/search-engine-switcher

Conversation

@Ishratnoori

@Ishratnoori Ishratnoori commented Sep 8, 2025

Copy link
Copy Markdown

Feature: Search Engine Switcher with Keyboard Shortcuts

What this PR adds:

  • Multiple Search Engines: DuckDuckGo, Google, ChatGPT, Gemini, Perplexity
  • Keyboard Shortcuts:
    • Alt + D - DuckDuckGo (default)
    • Alt + G - Google
    • Alt + C - ChatGPT
    • Alt + M - Gemini
    • Alt + P - Perplexity
  • Visual Feedback: Search bar placeholder updates to show current engine

How it works:

  1. Type your query in the search bar
  2. Press Alt + [respective letter] to switch search engines
  3. Press Enter to search with the selected engine

Benefits:

  • Quick switching between different search engines
  • No need to manually navigate to different sites
  • Maintains the aesthetic design of the startpage
  • Easy to use with keyboard shortcuts

Files to be modified:

  • index.html - Main functionality

This enhancement makes the startpage much more versatile for different types of searches!

@netlify

netlify Bot commented Sep 8, 2025

Copy link
Copy Markdown

Deploy Preview for nainish-startpage ready!

Name Link
🔨 Latest commit afe94b0
🔍 Latest deploy log https://app.netlify.com/projects/nainish-startpage/deploys/68c4075aa777f800088a289d
😎 Deploy Preview https://deploy-preview-95--nainish-startpage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Ishratnoori

Copy link
Copy Markdown
Author

Notes / Limitations

  • Google and Perplexity: support q= and open directly with the query.
  • ChatGPT and Gemini: may ignore q= unless you’re logged in and their UI accepts prefilled input. We still open the site so you can continue the conversation there.

Testing

  • Alt+D → DuckDuckGo + Enter opens results
  • Alt+G → Google + Enter opens results
  • Alt+P → Perplexity + Enter opens results
  • Alt+C → ChatGPT opens app (query may not auto-fill)
  • Alt+M → Gemini opens app (query may not auto-fill)

@Nainish-Rai Nainish-Rai requested a review from Copilot October 4, 2025 10:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a search engine switcher feature with keyboard shortcuts to the existing startpage. Users can now switch between different search engines (DuckDuckGo, Google, ChatGPT, Gemini, Perplexity) using Alt key combinations and their searches will be routed to the selected engine.

  • Replaced hardcoded DuckDuckGo search URL with configurable search engine system
  • Added keyboard shortcuts (Alt + D/G/C/M/P) for quick search engine switching
  • Implemented localStorage persistence for selected search engine preference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread index.html
Comment on lines +152 to +153
chatgpt: { name: "ChatGPT", url: "https://chat.openai.com/?q=" },
gemini: { name: "Gemini", url: "https://gemini.google.com/app?q=" },

Copilot AI Oct 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ChatGPT and Gemini URLs appear to use incorrect query parameter formats. ChatGPT doesn't support direct search queries via URL parameters, and Gemini's URL structure may not handle the '?q=' parameter as expected for search functionality.

Suggested change
chatgpt: { name: "ChatGPT", url: "https://chat.openai.com/?q=" },
gemini: { name: "Gemini", url: "https://gemini.google.com/app?q=" },
chatgpt: { name: "ChatGPT", url: "https://chat.openai.com/" },
gemini: { name: "Gemini", url: "https://gemini.google.com/app" },

Copilot uses AI. Check for mistakes.
Comment thread index.html
];

// Preload all of the themes css to avoid the FOUC on change

Copilot AI Oct 4, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty line with trailing whitespace should be removed to maintain clean code formatting.

Suggested change

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants