Skip to content

Instantly share code, notes, and snippets.

@gmillerd
Last active March 2, 2025 05:21
Show Gist options
  • Select an option

  • Save gmillerd/ab877c43bd65f85942e299e27f9d9c09 to your computer and use it in GitHub Desktop.

Select an option

Save gmillerd/ab877c43bd65f85942e299e27f9d9c09 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name myFB
// @namespace https://gist.github.com/gmillerd
// @version 2025-03-02
// @description try to take over the world!
// @author gmillerd
// @match https://www.facebook.com
// @icon https://www.google.com/s2/favicons?sz=64&domain=facebook.com
// @require http://code.jquery.com/jquery-latest.js
// @grant none
// @updateURL https://gist.githubusercontent.com/gmillerd/ab877c43bd65f85942e299e27f9d9c09/raw/7f6d9a1fcb6f903453efb1e0741eeedff6b4e47a/tamperMonkey_fbfades.js
// @downloadURL https://gist.githubusercontent.com/gmillerd/ab877c43bd65f85942e299e27f9d9c09/raw/7f6d9a1fcb6f903453efb1e0741eeedff6b4e47a/tamperMonkey_fbfades.js
// ==/UserScript==
(function() {
'use strict';
const fadeLevel = 0.5;
$(document).ready(function(){
function delouse(){
if(window.location.href !== "https://www.facebook.com/") return;
// $('div[role="main"]').children().css('background-color', 'green');
$('a[href*="/ads/about"]').each(function(){
$(this)
.parent().parent().parent().parent().parent().parent().parent().parent()
.parent().parent().parent().parent().parent().parent().parent().parent()
.parent()
.hide();
});
$('span:contains("Follow")').each(function(){
if( $(this).text().trim() === "Follow"){
$(this)
.parent().parent().parent().parent().parent().parent().parent().parent()
.parent().parent().parent().parent().parent().parent().parent().parent()
.parent().parent()
.parent().parent()
.fadeTo("slow", fadeLevel);
}
});
$('span:contains("Join")').each(function(){
if( $(this).text().trim() === "Join"){
$(this)
.parent().parent().parent().parent().parent().parent().parent().parent()
.parent().parent().parent().parent().parent().parent().parent().parent()
.parent().parent()
.fadeTo("slow", fadeLevel);
}
});
$('span:contains("People You May Know")').each(function(){
if( $(this).text().trim() === "People You May Know"){
$(this)
.parent().parent().parent().parent().parent().parent().parent().parent()
.fadeTo("slow", fadeLevel);
}
});
$('span:contains("Wordle")').each(function(){
if( $(this).text().trim().startsWith("Wordle")){
$(this)
.parent().parent().parent().parent().parent()
.parent().parent().parent().parent().parent()
.fadeTo("slow", fadeLevel);
}
});
}
window.addEventListener('scroll', ()=>{
setTimeout(()=>{
delouse();
}, 500);
});
setInterval(()=>{
delouse();
}, 1000);
});
})();

Comments are disabled for this gist.