Facebook Block Sponsored figuccio

rimuove Sponsoredon right Facebook

// ==UserScript==
// @name            Facebook Block Sponsored figuccio
// @namespace       https://greasyfork.org/users/237458
// @version         0.8
// @author          figuccio
// @description     rimuove Sponsoredon right Facebook
// @match           https://*.facebook.com/*
// @run-at          document-start
// @grant           GM_addStyle
// @icon            https://facebook.com/favicon.ico
// @license         MIT
// ==/UserScript==
(function() {
    'use strict';
 //nasconde  la scritta sponsorizzato 26 febbr 2025
GM_addStyle('span > div > .x1n2onr6 > .x1cnzs8.xjkvuk6.x193iq5w.x2lah0s.xdt5ytf.x78zum5.x9f619.x1ja2u2z.x1n2onr6{display:none!important;}');

    function hideSponsoredSections() {
        var sponsor = document.querySelectorAll('[aria-label="Inserzionista"]');
        sponsor.forEach(function(sponsor) {
            sponsor.style.display = 'none';
        });
    }

    hideSponsoredSections();

    // Observe changes in the DOM to hide sections if added later via AJAX
    var observer = new MutationObserver(function(mutationsList) {
        for (var mutation of mutationsList) {
            if (mutation.type === 'childList') {
                hideSponsoredSections();
            }
        }
    });

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

   

})();