AdBlock for Facebook

Block / Hide "Sponsored" posts on Facebook

These are versions of this script where the code was updated. Show all versions.

  • v1.6 2019-08-09 Fix script not working due to facebook not creating the stream_pagelet element until first post loads. Ads may show for 1.5 seconds, but will be blocked after that.
  • v1.5 2019-04-01 Facebook has apparently loading sponsored posts asynchronously. Asynchronous loading of posts was causing sponsored posts to not contain ad content for some time if the user was scrolling slowly. As a result, such posts were getting marked as "not ads" and were not re-scanned when the sponsored content was inserted. This new version fixes that issue by using a checksum to re-scan posts when their innerText changes.
  • v1.12 2019-03-13 Turn off script for pages other than news feed to prevent errors
  • v1.11 2019-03-13 Hide ads instead of deleting them because deleting them now breaks the Facebook site. This is an important update.
  • v1.04 2019-03-05 Add URL tag abDbg=true for debug mode
  • v1.03 2019-03-03 Comment out console.log statements to stop unnecessary clutter of console
  • v1.02 2019-03-03 Recently, Facebook has started randomly inserting newlines in the "Sponsored" declaration, so about 1/3 to 1/2 of the ads were not getting blocked. This issue has been fixed for this version and all ads are blocked at time of update
  • v1.01 2019-02-21 Hide ads with CSS instead of deleting them to prevent them from being re-inserted
  • v1.0 2019-02-21 Slight code refactoring / debugging improvements
  • v0.9 2019-02-21 Stop constant console messages
  • v0.1 2019-02-21