Create an ad blocker
1 year ago Facebook started a new ad system way more aggressive.
Ads are now everywhere on your news feed, and ad blocker were not updated.
I'm not against some ad, but for me their system was to much and I decided to build a little ad blocker only for the new system of Facebook.
An open source chrome extension available here https://github.com/L3o-pold/Facebook-ads-blocker.
It's now pretty useless because ad blocker handle this new kind of ads very well but it was like a proof of concept that some Javascript lines can be very powerful.
The script will loop every post and try to find if it's an ad. I used some hard coded strings like "Sponsored" or "Suggested Post" so this extension worked only on English and French version of Facebook.
With 24 users on this day and only one bad report, it seems to be a good idea and help some people.
This extension is still available at https://chrome.google.com/webstore/detail/facebook-ads-blocker/lmfflnbopbailibmjpepkmgmencpfcak
Update August 2017: Ads blocker like ublock origin now block Facebook ads again
Update 2018-03-02: Chrome Web store taked down the extension for "Trademark Infringement"
Update 2018-09-22: Facebook seems to have changed their ads system and ads blocker are no longer working properly on Facebook. My extension are no longer working either.
They do not longer using static strings like "Sponsored" or "Suggested Post" in the DOM but creating some string like "SpSponsssorrred" which they modify with CSS to looks like the word Sponsored. I do not see at this time a way to detect this kind of sponsored post on your feed.
If you have ideas do not hesitate to email me or to make a pull request.