Created
June 24, 2017 10:23
-
-
Save rensjaspers/070346dad45667c1419f4a4b261aecc0 to your computer and use it in GitHub Desktop.
Remove other search engines from Google Chrome
This file contains 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
/* | |
1. ) Go to chrome://settings/searchEngines | |
2. ) Press Ctrl+Shift+J (or ⌥+⌘+J (Option+Command+J) if you're using Mac OS X) | |
3. ) Paste this script and press ENTER. | |
You may have to repeat step 3 two or three times. | |
*/ | |
var otherSearchEngineList = document.getElementById('other-search-engine-list'); | |
var d = otherSearchEngineList.getElementsByClassName("row-delete-button"); | |
d = Array.prototype.slice.call(d); | |
d.forEach(function(n) { | |
var e = document.createEvent("MouseEvents"); | |
e.initEvent("click", true, false); | |
n.dispatchEvent(e, true); | |
e = document.createEvent("MouseEvents"); | |
e.initEvent("mousedown", true, false); | |
n.dispatchEvent(e, true); | |
e = document.createEvent("MouseEvents"); | |
e.initEvent("mouseup", true, false); | |
n.dispatchEvent(e, true); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment