Skip to content

Instantly share code, notes, and snippets.

@Danny-Engelman
Created March 6, 2019 11:40
Show Gist options
  • Save Danny-Engelman/1108cee068b11acc7aebfa3c67d063d7 to your computer and use it in GitHub Desktop.
Save Danny-Engelman/1108cee068b11acc7aebfa3c67d063d7 to your computer and use it in GitHub Desktop.
Clear Chrome Custom Search Engines
// Delete all search-engines not starting with _ or named Google
// Open Settings -> Search Engines
// Open F12 Developer tools
// Run scipt as snippet
settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList()
.then(function(val) {
val.others.sort(function(a, b) { return b.modelIndex - a.modelIndex; });// sort just for clarity
val.others.forEach(function(engine) {
if(engine.displayName.startsWith('_') || engine.displayName.includes('Google')){
console.log(engine);
} else {// DELETE
settings.SearchEnginesBrowserProxyImpl.prototype.removeSearchEngine(engine.modelIndex);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment