Code Monkey home page Code Monkey logo

fb-ad-preference-remover's Introduction

FB-Ad-preference-remover

Script to remove all ad preferences on facebook

How to run

  1. Log into Facebook on Google Chrome on a desktop
  2. Go to Settings - > Ads -> Ads Based on my preferences -> Manage preferences
  3. On the preferences page, expand all the categories. I was unable to automate this.
  4. Press F12 on a Windows or Cmd+Shift+I on a Mac
  5. This opens the developer console. On the top, you'll find a console tab. Click that
  6. You'll see a STOP warning from Facebook here. Ignore that, we are just automating what you'd otherwise have to do by clicking about 350 times (Check out fbapr.js for code comments and reading the code so that you understand the security of this script you'll be running.)
  7. Copy paste the code from the fbapr-min.js file into the console tab.
  8. Sit back and watch hundreds of ad categories being removed!

What it does

  1. Loads jQuery into the console
  2. Finds all "Show more" buttons and clicks them
  3. Waits a little while(15 secs) for all the categories to load
  4. Clicks the "X" button next to all the preferences

Script Modifications/Requirements

  • Occasionally, FB will update their div/button classes, so you'll need to update the script variables to point at the correct class id's. Screenshots below on what each variable represents.

Variable References

  • see_more_button_class
    see_more_button_class
  • ad_cats_class
    ad_cats_class
  • category_class
    category_class
  • remove_button_class
    remove_button_class

fb-ad-preference-remover's People

Contributors

anuragd avatar mmaietta avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.