fuck reels

31/03/2025, 05:51:04

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        fuck reels
// @namespace   Violentmonkey Scripts
// @match       https://www.facebook.com/*
// @grant       none
// @version     1.0
// @author      -
// @description 31/03/2025, 05:51:04
// ==/UserScript==
function findAndDeleteReels() {
    const spans = document.querySelectorAll("div > div > div > div > div > div > div > div > div > div > div > span");
    const found = Array.from(spans).find(span => span.textContent.includes("Reels"));

    if (found) {
        console.log("Found:", found);

        let parent = found;
        let depth = 0;

        while (parent.parentElement && depth < 23) {
            parent = parent.parentElement;
            depth++;
        }

        if (depth === 23 && parent.parentElement) {
            console.log("Deleting parent 23:", parent);
            parent.remove(); // Remove the 23rd parent element
            return true;
        } else {
            console.log("Parent 23 does not exist.");
        }
    }
    return false;
}

if (!findAndDeleteReels()) {
    console.log("Not found initially, starting observer...");

    const observer = new MutationObserver(() => {
        if (findAndDeleteReels()) {
            console.log("Found dynamically, stopping observer.");
            observer.disconnect();
        }
    });

    observer.observe(document.body, { childList: true, subtree: true });
}