It's a blog

Browser extension to clear your Facebook advert interests

Extension logo

At the end of 2018, I wrote a blog post that included some JavaScript code to quickly remove all of your Facebook advert interests from this settings page. This has started to become one of my more popular posts and so I decided to take another pass at the project and convert the code into a browser extension.

The new extension provides the user with an extra button on the ad interests page that will automatically go through and click all of the remove buttons for all of the interest tabs that appear on the top bar. The UI isn’t the best, but it is functional!

You can grab a copy now for 4 major browsers:

Small improvements

The extension still only works on the English version of Facebook, but now consistently works between different English versions. In the old blog code, there was a problem with translations of Facebook elements having different capitalizations, but that is now taken into account.

A short wait time of 200ms or so has been added between clicks. In the previous version, some users reported that even though some remove buttons were clicked by the script upon reloading some interests would still be listed. I have a feeling, but no proof, that this is down to some rate-limiting done by Facebook.

All visible interest tabs are now cycled through rather than the user needing to run the script once per interest tab, saving everyone a few more moments of life and a few more manual clicks.

Behind the scenes

Code for the extension is on GitHub and should be easy enough to follow.

The logo was created using various parts of various logos from the iconfinder.com iconset called circle-icons-1. Thanks Nick Roach for the GPL licenced icons!

The extension is built using webextension-toolbox which allows easy extension building for Chrome, Firefox, Opera and Edge. I tried using the yeoman generator however npm kept freezing, but I sound the main repo easy enough to work with and remove the parts that I didn’t need.

I plan on using this toolbox to write all future browser extensions and I’m also going to go back and rewrite my previous extensions to use this. The only item that is currently missing as part of the toolbox is automatic zip creation of the builds for uploading to the various web stores.

This is the first extension that I have needed to upload to multiple web stores, and the processes was… not the fastest. Is there some service to do this all for me? If not, should there be one?

Increase in views of the origional blog post

5 Comments

  1. BarqFarooq

    That’s Great!

  2. Sarah Reuer

    I downloaded the extension for chrome, but it doesn’t seem to be working!

    • addshore

      What seems to happen / not work? :)

  3. Diesel

    Thank you SO much for this!! You’re a real hero. What about removing all businesses who have either uploaded a list or that you’ve interacted with? I’d pay for this!

    • addshore

      Not a bad idea, I’ll try to take a look at that when I next look at the code!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2020 Addshore

Theme by Anders NorĂ©nUp ↑

%d bloggers like this: