Remove Chrome's Custom Search Engines
Flush Custom Search
At the time of writing, this “feature” cannot be disabled without a dedicated chrome extension1. And of course removing each item one by one is unreasonable.
Hence the following JS snippet iterate over each item in the list and clicks the delete button.
Usage#
- Go to the search engine settings
chrome://settings/searchEngines
. - Open the Developer Tools by clicking
F12
orCTRL+SHIFT+I
. - Copy the script below and paste it in the Javascript console tab.
- Fire Away.
Snippet#
A slight delay has been added between clicks since after each action the browser takes a moment to render the view. feel free to adjust the sleep at line 16
as you see fit.
const otherEngines = document.querySelector("body > settings-ui")
.shadowRoot.querySelector("#main")
.shadowRoot.querySelector("settings-basic-page")
.shadowRoot.querySelector("#basicPage > settings-section.expanded > settings-search-page")
.shadowRoot.querySelector("#pages > settings-subpage > settings-search-engines-page")
.shadowRoot.querySelector("#otherEngines").shadowRoot
let n = otherEngines.querySelector('iron-list').childElementCount - 1;
let rmbtn = otherEngines.querySelector('#frb0')
.shadowRoot.querySelector('#delete')
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
while(n--) {
rmbtn.click();
await sleep(2000);
}
-
Don’t add custom search engines by Greg Sadetsky, ↩︎