Skip to content

Instantly share code, notes, and snippets.

@scarlac
Last active June 7, 2021 09:36
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save scarlac/3c4b9d9868148ef31e2ea5082e59a0f1 to your computer and use it in GitHub Desktop.
Save scarlac/3c4b9d9868148ef31e2ea5082e59a0f1 to your computer and use it in GitHub Desktop.
Facebook Hack: Purge list of "Advertisers you've interacted with"

For those of you who want to remove all in “Advertisers and Businesses” / "Who uploaded a list with your info and advertised to it":

  1. Go to https://www.facebook.com/ads/preferences/?entry_product=ad_settings_screen and open the section "Advertisers you've interacted with"
  2. Collapse all sections but keep "Advertisers and Businesses" open
  3. Open Web Inspector
  4. Copy-paste this script to load all advertisers: smt=setInterval(() => {let x=document.querySelector('div[shade=medium]'); x ? x.click() : clearInterval(smt), console.log('done')}, 1000)
  5. It will output a number. Wait for it to say “done” in the console. This may take a long time. you'll notice the scrollbar changing while it's loading all advertisers.
  6. Copy-paste this and press enter: document.querySelectorAll('[data-tooltip-content="Hide all ads from this advertiser"]').forEach(el => el.click())
  7. Wait for advertisers to turn grey, indicating they've been removed (this may take a while as well)

That's it.

@scarlac
Copy link
Author

scarlac commented Feb 24, 2020

@drnic1 The log statement is clearly working from your paste. It's saying "done". Make sure you followed the instructions. Expand the relevant panels and collapse all others.

@drnic1
Copy link

drnic1 commented Feb 24, 2020

OK - thanks - appreciate the feedback
I think I may be confusing this working with the new tab of "Advertisers who have uploaded information about you"....
Another huge list of people that require manual deleting with 4 clicks per company

@vdias
Copy link

vdias commented Jun 7, 2021

Not working...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment