Created
December 14, 2020 02:32
-
-
Save gak/f313c452e053e2ec48cc012d0ee80dcf to your computer and use it in GitHub Desktop.
A Greasemonkey script to remove Google Search's "People also searched for" box.
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 Remove Google Search's "People also searched for" box. | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
/* | |
This works for me. YMMV. I take no responsibility. | |
Licenced under MIT. | |
*/ | |
function removeBox() { | |
var closeButton = document.querySelector("[aria-label='Dismiss suggested follow ups']"); | |
if (!closeButton) { | |
return; | |
} | |
let parent = closeButton; | |
for (var i = 0; i < 4; i++) { | |
parent = parent.parentNode; | |
} | |
parent.parentNode.removeChild(parent); | |
parent.parentNode.style.removeProperty("height"); | |
} | |
setInterval(removeBox, 100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment