Hide Video Recommendations (Watch Feed Blocker)

Hide video recommendations and other unwanted sections on Facebook, even when scrolling

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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         Hide Video Recommendations (Watch Feed Blocker)
// @namespace    https://github.com/MAAB-FW/hide-fb-video-recommendations
// @version      1.3
// @description  Hide video recommendations and other unwanted sections on Facebook, even when scrolling
// @author       @maab-fw
// @match        https://www.facebook.com/*
// @grant        GM_addStyle
// @license      MIT
// ==/UserScript==

(function () {
  "use strict";

  const cssRules = `
        .x1iyjqo2 > div:nth-of-type(1) > ul > li:nth-of-type(7),
        .xzkaem6.xh8yej3.xxzkxad.x7wzq59,
        #watch_feed > div > div.x78zum5:nth-of-type(2),
        li:nth-of-type(23) > div,
        .x1iyjqo2 > div:nth-of-type(1) > ul > li:nth-of-type(14) > div,
        .x1a8lsjc.x889kno.xso031l.x1q0q8m5.x1nb4dca.x1ve1bff,
        li.x1gz44f.x13fj5qh.x1awlv9s.x1l38jg0.x1hxoosp.xmlsiyf.x1iyjqo2:nth-of-type(3),
        .x11t971q.xvc5jky.x1vqzy7e.x13qq4wz.xaooukx {
            display: none !important;
        }
    `;

  // Apply styles immediately
  GM_addStyle(cssRules);

  // Reapply styles dynamically when DOM changes (SPA behavior)
  const observer = new MutationObserver(() => {
    GM_addStyle(cssRules);
  });

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