1

How can I make Startpage's search results page automatically highlight query keywords used in the search without changing the browser's search tools?

For example, DuckDuckGo automatically highlight almost all query keywords in the search results.

screenshot of startpage, duckduckgo

2

That feature was removed. Per Startpage support:

As of November 2018, the highlighting feature is no longer supported, as it is available in all major browsers.

Just because the browser can do it, doesn't make it convenient to do it as an additional, separate step, so maybe not a great decision on their part. But there it is.

1

You can try to use this userscript. It basically does exactly what you want. You'll need an extension to run custom userscripts though, like violentmonkey

Here is the content of that userscript (version 1.6):

// ==UserScript==
// @name           StartPage Beautifier
// @namespace      https://framagit.org/SecT0uch/StartPage-Beautifier
// @description    This greasemonkey UserScript helps the user to focus on the revelant information in the result page. It basically put the search terms in bold.
// @version        1.6
// @author         SecT0uch <pro.ernst@gmail.com>
// @homepageURL    https://framagit.org/SecT0uch/StartPage-Beautifier
// @license        CC-BY-NC-SA-4.0; https://creativecommons.org/licenses/by-nc-sa/4.0/
// @copyright      2018+, Jordan ERNST (https://framagit.org/SecT0uch/StartPage-Beautifier)
// @match          https://*.startpage.com/do/*search*
// ==/UserScript==

window.addEventListener ("load", Greasemonkey_main, false);

function Greasemonkey_main () {
    var toClean = ['title:', 'host:', 'url:', 'link:', ' OR', '"'];     // Special chars to exclude from being bolded
    var query = document.getElementById("query").value;             // Search request

    for (var x = 0; x < toClean.length; x++) {
        query = query.replace(new RegExp(toClean[x], 'g'), '');         // Removing special chars from request
    }

    var searchTerms = query.split(' ');                                 // Splitting request string in array
    var searchTerms = searchTerms.filter(String);                       // Remove empty values (fix begin/end/double white spaces)

    var results =  document.querySelectorAll("p.search-item__body");             // Description text (under link)

    // We bold every term in every description :
    for (var i = 0; i < results.length; i++) {
        for (var j = 0; j < searchTerms.length; j++) {
            var term = searchTerms[j];
            results[i].innerHTML = results[i].innerHTML.replace(new RegExp(term, 'gi'), "<strong>$&</strong>");    // $& = matched value.   <b></b> not supported
        }
    }
}
0

As user632131 said, the userscript I developped do exactly what you need.

However I strongly recommend you to install it from GreasyFork as your extension will be able to detect updates automatically.

Currently, the version is 1.7, not 1.6 anymore.

Here is an example : enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.