Code Monkey home page Code Monkey logo

facebook_adblock's Introduction

facebook_adblock

An open-source Ad Blocker for Facebook™

This extension is 100% free and open source.

Installation

Chrome

https://chrome.google.com/webstore/detail/ad-blocker-for-facebook/kinpgphmiekapnpbmobneleaiemkefag

Chrome Web Store Chrome Web Store Chrome Web Store

Firefox

https://addons.mozilla.org/en-US/firefox/addon/fb_ad_block/ (Thanks to Chih-Hsuan Yen)

Mozilla Add-on Mozilla Add-on Mozilla Add-on

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
  2. The compiled extension should be in dist/
  3. 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 label

You 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",
`<style>
  *[data-blocked] {
    display:inherit !important;
    border: red 10px solid;
  }
  *[data-blocked=allowedList] {
    border-color: green;
  }
</style>`);

Publishing

  1. Tag a commit with a string with this format v*.*.*
    • git tag -a v2.0.0
  2. Push a tag to Github
  3. 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

facebook_adblock's People

Contributors

tiratatp avatar cbotsikas avatar haidang666 avatar marcabonce avatar badpenguin avatar kleingeld avatar doronbehar avatar rugpanov avatar jurosh avatar tartansandal avatar bephen avatar lipazsolt avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.