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:
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 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?