Welcome to the Power Users community on Codidact!
Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.
Adding google link to startpage search engine
I recently switched from DuckDuckGo to startpage as my primary search engine. I was using the firefox addon duckduck-go-google to add a google link to the DuckDuckGo search results - just in case it didn't have the results I was looking for:
Is it possible to add a similar link to the startpage?
1 answer
The following users marked this post as Works for me:
| User | Comment | Date |
|---|---|---|
| samcarter | (no comment) | Sep 19, 2025 at 15:08 |
The following tampermonkey user script is puzzled together from fragments of other scripts and some AI. It is probably not the best solution, but it seems to work:
// ==UserScript==
// @name Add Google Search Link to Startpage
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Adds a link to Google search with the same keywords on the Startpage.com search page
// @author Your Name
// @match https://www.startpage.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to add a Google search link with colored letters
function addGoogleSearchLinkWithColoredLetters() {
console.log('Adding Google search link with colored letters...'); // Debug message
// Create a new div element for the link
var googleLinkDiv = document.createElement('div');
googleLinkDiv.style.margin = '0px 0 0px 40px'; // Added left margin to move right
// Find the search input field
var searchInput = document.querySelector('.search-form-input');
if (searchInput) {
// Get the search keywords
var searchKeywords = searchInput.value;
// Create a new span element for each letter in "Google" with specific colors
var googleText = document.createElement('span');
googleText.textContent = 'G';
var o1Text = document.createElement('span');
o1Text.textContent = 'o';
var o2Text = document.createElement('span');
o2Text.textContent = 'o';
var gText = document.createElement('span');
gText.textContent = 'g';
var lText = document.createElement('span');
lText.textContent = 'l';
var eText = document.createElement('span');
eText.textContent = 'e';
// Apply colors to each letter
googleText.style.color = '#4285F4'; // Blue
o1Text.style.color = '#EA4335'; // Red
o2Text.style.color = '#FBBC05'; // Yellow
gText.style.color = '#4285F4'; // Blue
lText.style.color = '#34A853'; // Green
eText.style.color = '#EA4335'; // Red
// Create a new anchor element for the link
var googleLink = document.createElement('a');
googleLink.href = 'https://www.google.com/search?q=' + encodeURIComponent(searchKeywords);
googleLink.style.textDecoration = 'none'; // No underline
// Append the colored letters to the link
googleLink.appendChild(googleText);
googleLink.appendChild(o1Text);
googleLink.appendChild(o2Text);
googleLink.appendChild(gText);
googleLink.appendChild(lText);
googleLink.appendChild(eText);
// Append the link to the div
googleLinkDiv.appendChild(googleLink);
// Find the blog menu button container
var blogMenuButton = document.querySelector('.blog-menu-button');
// Insert the link after the blog menu button container
if (blogMenuButton) {
blogMenuButton.parentNode.insertBefore(googleLinkDiv, blogMenuButton.nextSibling);
console.log('Google search link with colored letters added successfully.'); // Debug message
} else {
console.log('Blog menu button container not found.'); // Debug message
}
} else {
console.log('Search input field not found.'); // Debug message
}
}
// Use MutationObserver to wait for the body element to be fully loaded
var observer = new MutationObserver(function(mutations) {
if (document.body) {
addGoogleSearchLinkWithColoredLetters();
observer.disconnect(); // Stop observing once the body is found
}
});
// Start observing the document body for changes
observer.observe(document.documentElement, { childList: true, subtree: true });
})();

0 comment threads