Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/facebook-adblock/facebook_adblock
An open-source Ad Blocker for Facebook™
https://github.com/facebook-adblock/facebook_adblock
browser-extension chrome-extension facebook facebook-adblock firefox-addon javascript
Last synced: 6 days ago
JSON representation
An open-source Ad Blocker for Facebook™
- Host: GitHub
- URL: https://github.com/facebook-adblock/facebook_adblock
- Owner: facebook-adblock
- License: gpl-3.0
- Created: 2016-06-15T21:18:43.000Z (over 8 years ago)
- Default Branch: mainline
- Last Pushed: 2023-02-12T14:59:23.000Z (over 1 year ago)
- Last Synced: 2024-08-02T16:43:10.260Z (3 months ago)
- Topics: browser-extension, chrome-extension, facebook, facebook-adblock, firefox-addon, javascript
- Language: JavaScript
- Homepage:
- Size: 3.91 MB
- Stars: 215
- Watchers: 15
- Forks: 42
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# facebook_adblock
An open-source Ad Blocker for Facebook™
- Support the FB5 layout (Thanks to [Christos Botsikas](https://github.com/cbotsikas))
- Blocks both suggested posts and sidebar ads
- Does not slow down your computer
- Does not track/read your Facebook activity, or other websites
- You can inspect everything about this extension here, https://github.com/facebook-adblock/facebook_adblock/blob/mainline/src/main.jsThis extension is 100% free and open source.
## Installation
### Chrome
https://chrome.google.com/webstore/detail/ad-blocker-for-facebook/kinpgphmiekapnpbmobneleaiemkefag
[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/kinpgphmiekapnpbmobneleaiemkefag.svg)](https://chrome.google.com/webstore/detail/ad-blocker-for-facebook/kinpgphmiekapnpbmobneleaiemkefag)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/users/kinpgphmiekapnpbmobneleaiemkefag.svg)](https://chrome.google.com/webstore/detail/ad-blocker-for-facebook/kinpgphmiekapnpbmobneleaiemkefag)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/stars/kinpgphmiekapnpbmobneleaiemkefag.svg)](https://chrome.google.com/webstore/detail/ad-blocker-for-facebook/kinpgphmiekapnpbmobneleaiemkefag)### Firefox
https://addons.mozilla.org/en-US/firefox/addon/fb_ad_block/ (Thanks to [Chih-Hsuan Yen](https://github.com/yan12125))
[![Mozilla Add-on](https://img.shields.io/amo/v/fb_ad_block.svg)](https://addons.mozilla.org/en-US/firefox/addon/fb_ad_block/)
[![Mozilla Add-on](https://img.shields.io/amo/users/fb_ad_block.svg)](https://addons.mozilla.org/en-US/firefox/addon/fb_ad_block/)
[![Mozilla Add-on](https://img.shields.io/amo/stars/fb_ad_block.svg)](https://addons.mozilla.org/en-US/firefox/addon/fb_ad_block/)Enjoy!
_We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with Facebook._
_Facebook is a registered trademark of the Facebook, Inc._
## Building
1. Run `npm run release`
1. The compiled extension should be in `dist/`
1. Load the unsigned extension into your browser## Debugging
All processed DOM elements are flagged with `data-blocked` attribute. Possible values are:
- `allowedList`: allowed list
- `blockedList`: blocked due to blocked list check
- `sponsored`: blocked due to sponsored labelYou can use dev tools console with CSS selectors like `*[data-blocked]` or `*[data-blocked=sponsored]`.
For example add inline style properties to all existing hidden sponsored posts:
```
document.querySelectorAll("*[data-blocked=sponsored]").forEach((x) => {
x.style.display="inherit";
x.style.border="red 10px solid";
});
```You can also inject css which applies to both existing and new processed elements:
```
document.head.insertAdjacentHTML("beforeend",
`
*[data-blocked] {
display:inherit !important;
border: red 10px solid;
}
*[data-blocked=allowedList] {
border-color: green;
}
*[data-adblocked] {
display:inherit !important;
border: pink 10px solid;
}
*[data-adblock-monitored] {
border: blue 10px solid;
}
*[data-adblock-observed] {
border: aqua 10px solid;
}
`);
```## Publishing
1. Tag a commit with a string with this format `v*.*.*`
- `git tag -a v2.0.0`
1. Push a tag to Github
1. Github action should publish the extension to both Firefox and Chrome
- Firefox should be released in a couple of minutes
- Chrome can take as long as a few months if it needs a review