Last active
November 2, 2023 19:49
-
-
Save jdelamater99/a0149fffad51fbf451ffdd81723b4d13 to your computer and use it in GitHub Desktop.
Hide "suggested for you" from wall
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 Hide Facebook Suggestions | |
// @namespace http://jdel.us | |
// @description Hide "suggested for you" from wall | |
// @include https://*.facebook.* | |
// @version 1.0 | |
// @grant none | |
// ==/UserScript== | |
let suggestions = document.getElementsByClassName("x1lliihq"); | |
let timer = 0; | |
timer = setTimeout(() => { | |
hideSuggestions(); | |
}, 500); | |
window.addEventListener("scroll", hideSuggestions); | |
function hideSuggestions(){ | |
for (let i=0; i<=suggestions.length; i++){ | |
if (suggestions[i].innerHTML.search("Suggested for you") !== -1) { | |
suggestions[i].style.display = "none"; | |
//suggestions[i].innerHTML = "<p>// Suggestion Removed //</p>"; | |
} | |
} | |
if (timer) { | |
clearTimeout(timer); | |
timer = 0; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment