Remove All Facebook Ads

By LeoXavior Last update Jul 4, 2012 — Installed 37,602 times.

Script Summary: Removes any and all ads from Facebook. Updated to work in chrome.



Version: 2.0.3

If you're still seeing ads on facebook while using this script please post the url in the discusion area here: http://userscripts.org/scripts/discuss/94763

Two new options have been added in the source one is to disable the live ticker on application pages, the other is to hide the game book marks on application pages.

// @history 2.0.3 Some facebook changed allowed me to simplify the checks now using: AdObj: fbAdUnit, OtherAdObj: pagelet_side_ads, pagelet_ego_pane_w
// @history 2.0.2 Added a 'fbTimelineSideAds' container new code alteration by facebook
// @history 2.0.1 Added a 'related ads' container check that was being missed by the code
// @history 2.0.0 Big re-write on Feb 11th, 2012 to update it for current fb changes.
// @history 1.0.8 Minor fix due to facebook changes see source
// @history 1.0.7 Added @match for better chrome support, and added options to hide the Game Ticker, and Bookmarks on app pages, by default these are off for now manually edit the src.
// @history 1.0.6 Re-worked the xpath detections as to remove certain matches for fan pages and others to happen before other's this adds more code but not at much of a performance cost as previously removed nodes no longer exist to be detected.
// @history 1.0.5 Fixed some message spam in the console due to not removing childnodes from the ads parent element
// @history 1.0.4 Digging up all the current ad elements on facebook, if some are missing please let me know via providing links/element names.
// @history 1.0.3 Added an onload event to execute the script
// @history 1.0.2 cleaned up code a bit, reduced some overhead
// @history 1.0.1 added Automated Update support
// @history 1.0.0 added code to remove ads on reqs.php and user profile pages.