Skip to content

Instantly share code, notes, and snippets.

@lyoshenka
Created October 30, 2018 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lyoshenka/5967469b600f25d4f4ca892fe5eb3bbd to your computer and use it in GitHub Desktop.
Save lyoshenka/5967469b600f25d4f4ca892fe5eb3bbd to your computer and use it in GitHub Desktop.
Delete all non-custom search engines from chrome
// DANGER: this will delete all search engines that don't have a `.` in their keyword
// Go to chrome://settings/searchEngines and put this in the console
settings.SearchEnginesBrowserProxyImpl.prototype.getSearchEnginesList()
.then(function(val) {
val.others.sort(function(a, b) { return b.modelIndex - a.modelIndex; });
val.others.forEach(function(engine) {
if (engine.keyword.includes(".")) {
settings.SearchEnginesBrowserProxyImpl.prototype.removeSearchEngine(engine.modelIndex);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment