Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Remove facebook sponsored ads
"use strict";
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
const observer = new MutationObserver(function(mutations, observer) {
const sponsoredRegex = /[S][sponred]*/;
mutations.filter((mutation) => => match === "").length >= 4).map((ad) =>;
observer.observe(document.getElementById("stream_pagelet"), {
subtree: true,
attributes: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.