Created
May 1, 2020 16:48
-
-
Save Goblin80/684fabc153f3365825442956562a3fa4 to your computer and use it in GitHub Desktop.
Remove Chrome's Custom Search Engines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Go to chrome://settings/searchEngines | |
// Open the Developer Tools | |
// Run the following in the Javascript console tab | |
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); // adjust the sleep duration as you see fit. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want a permanent solution and don't mind installing an extra chrome extension:
Don't add custom search engines by Greg Sadetsky,