Changing Chrome Browser Built-in Search Engine Shortcut
Google Chrome is one of the most popular web browsers in the world, with a market share of over 60%. One of the key features of Chrome is its ability to quickly search the web using a built-in search engine. By default, this search engine is set to Google, but it can be changed to another search engine if desired.
Why Change the Built-in Search Engine Shortcut?
There are several reasons why you might want to change the built-in search engine shortcut in Chrome. For example, you might prefer to use a different search engine, such as DuckDuckGo or Bing, for privacy reasons. Or, you might want to use a specialized search engine, such as Wikipedia or GitHub, for specific tasks.
How to Change the Built-in Search Engine Shortcut
To change the built-in search engine shortcut in Chrome, follow these steps:
- Open Chrome and click on the three dots in the top right corner of the window.
- From the dropdown menu, select
Settings. - In the left-hand menu, click on
Search engine. - Under the
Search engine used in the address barsection, click on the dropdown menu and select the search engine you want to use.
Code Block: Changing the Built-in Search Engine Shortcut
Here is an example of how to change the built-in search engine shortcut using the Chrome settings menu:
// Open Chrome
chrome.exe
// Click on the three dots in the top right corner
chrome.menus.create({
id: "open-settings",
title: "Settings",
contexts: ["page"]
})
// From the dropdown menu, select "Settings"
chrome.menus.onClicked.addListener(function(info, tab) {
if (info.menuItemId === "open-settings") {
chrome.tabs.create({url: "chrome://settings/"});
}
})
// In the left-hand menu, click on "Search engine"
chrome.tabs.executeScript({
code: "document.querySelector('a[href=\"chrome://settings/searchEngines\"]').click();"
})
// Under the "Search engine used in the address bar" section,
// click on the dropdown menu and select the search engine you want to use
chrome.tabs.executeScript({
code: "document.querySelector('select[name=\"search\"]').value = \"YOUR\_SEARCH\_ENGINE\";"
})
References
- How to Change the Default Search Engine in Google Chrome
- How to Change the Default Search Engine in Google Chrome
- How to Change the Default Search Engine in Chrome
Types of references: online resources.