Skip to content

Instantly share code, notes, and snippets.

@meooow25
Last active February 18, 2022 21:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meooow25/0d7ffe87b6d1bbced92e9194cdcf043a to your computer and use it in GitHub Desktop.
Save meooow25/0d7ffe87b6d1bbced92e9194cdcf043a to your computer and use it in GitHub Desktop.
NoG4G
// ==UserScript==
// @name NoG4G
// @namespace https://github.com/meooow25
// @match *://www.google.com/search*
// @grant none
// @version 0.3
// @author meooow
// @description Removes G4G from Google search results
// ==/UserScript==
(function() {
for (const div of document.querySelector('#search').querySelector('div[data-async-context]').children) {
for (const a of div.querySelectorAll('a')) {
if (a.href.includes('//www.geeksforgeeks.org')) {
console.log('[NoG4G] Removing ' + a.href);
div.style.display = 'none';
break;
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment