A Chrome extension for Startpage.com which adds search queries to the tab title
Yasunori MAHATA
Posted on January 5, 2024
The advent of ChatGPT has significantly reduced the use of conventional web searches. However, since ChatGPT doesn't possess new knowledge, I occasionally use search engines to obtain the latest information.
I use Startpage as my search engine. It is advertised as "The world's most private search engine." According to their own description, they return search results without retaining any user information. A similar service with higher recognition is DuckDuckGo.
I personally think that the search quality of DuckDuckGo is "not very good." DuckDuckGo uses Bing as its backend search engine, but I find Bing's search results somewhat inferior compared to Google, especially when searching for information in languages except English.
When using Startpage as it is, I encounter a problem: it's hard to distinguish between multiple search result pages. For instance, suppose you have three tabs open with searches for "Startpage," "DuckDuckGo," and "Google." In Google Chrome, they appear as follows:
Repeated searches can make it unclear which tab contains which search results.
I believe this is an intentional design by Startpage. Common search engines include the search query in the URL parameters, like ?q=search-query
. Startpage receives search queries via POST requests, making it impossible to discern the search query from the URL. Similarly, not including the search query in the page title is likely a consideration to protect privacy even if someone peeks at your browser.
However, this compromises usability, which I personally find unbearable. To solve this, I created the Startpage Nicer Title Extension, a Chrome Extension. With this installed, the tabs look like this:
Can you see the difference? The search keywords are prefixed to the tabs. This makes it easier to distinguish between multiple search results in the browser.
The source code for this Chrome extension is available on GitHub. Speaking technically... there's not much to say. As of writing this article, the entirety of the code is the 5 lines in scripts/content.js
:
const searchBox = document.getElementById('q');
if (searchBox && searchBox.value.trim() !== "") {
document.title = searchBox.value + " - StartPage";
}
The search box <input />
in Startpage has an id="q"
, so the code just retrieves its value and stuffs it into document.title
. It's a short code, but I think it's amazing that something meaningful can be created with just this.
If you use a Chromium-based browser and are interested in Startpage, please try the Startpage Nicer Title Extension.
Posted on January 5, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
January 5, 2024