Created
August 16, 2020 01:28
-
-
Save sgtrusty/5d0f12b99ef067a6b4d3b3c6c9aded0d to your computer and use it in GitHub Desktop.
Delete other search engines from google chrome
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
// source: https://superuser.com/a/1547727/1158937 | |
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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
avoid further issues: