Skip to content

Instantly share code, notes, and snippets.

@jschaf
Last active December 25, 2017 04:50
Show Gist options
  • Save jschaf/212c79f3b378b4d13f055462f487783d to your computer and use it in GitHub Desktop.
Save jschaf/212c79f3b378b4d13f055462f487783d to your computer and use it in GitHub Desktop.
TamperMonkey script to prevent Chrome from auto-adding search engines.
// ==UserScript==
// @name RemoveOpenSearch
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Prevent Chrome from automatically adding search engines.
// @author Joe Schafer
// @match http://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const elOpenSearch = document.querySelector('[type="application/opensearchdescription+xml"]');
if (elOpenSearch) elOpenSearch.remove();
})();
@snowbound
Copy link

Does not seem to be working. In order to account for http and https connections to websites I replaced the http:/// with :///*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment