Last active
February 18, 2022 21:47
-
-
Save meooow25/0d7ffe87b6d1bbced92e9194cdcf043a to your computer and use it in GitHub Desktop.
NoG4G
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
// ==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