Coder Social home page Coder Social logo

no-adb-killer's Introduction

๐Ÿ‘ˆ๐Ÿป๐Ÿšซ No AdBlock-Killer

Have you ever had to disable adblock on a website? Thanks to no-adblock-killer, keep enjoying the ad-free website!

IMAGE ALT TEXT HERE

๐ŸŽ‰ Instalation Is So Easy !

chrome Chrome Extension

๐ŸŽ› How does it works ?

Adblock-killers are located in website source code, each using a different means to detect them.

This extension simply modifies a small part of the source code (1-10 chars) where the adblock is detected.


There is also more options avaibles to disable adblock-killer.

Check the config.json or npm run config:display to see what's changing on which website.

โœ… Tests

npm test
๐Ÿ—‘  Clearing
๐Ÿ“ Building scripts
๐Ÿˆบ Minifying configuration
โœ… 'config.min.json' file is now minfified.
๐Ÿ“Ž Building extension
๐Ÿ•‘ Testing


  #CONFIG
    โœ“ should read config
    โœ“ should have correct config file
    โœ“ should get the initial script (719ms)
    โœ“ should read the replaced script
    โœ“ should have unique name
    โœ“ should have correct differences
    โœ“ should have correct chrome pattern


  7 passing (744ms)

โŒจ๏ธ Usefull Commands

Name Command Description
start npm start Start the construction in watch mode. Any changes on src/ will automatically rebuild the extension.
๐Ÿ”ง development mode
build npm run build Build the project.
๐Ÿ“ฆ production mode
config npm run build:config Build the config.json.
This is not an automated task, so if you edit config.json please run it.
display npm run config:display Display the config.build.json user-friendly.

๐Ÿ‘€ Quick View Of The Architecture

Path Description
dist/ ๐Ÿ“ Where scripts are built and ready to run.
app/ ๐Ÿ–ฅ The built chrome extension.
static/config.json ๐Ÿ’พ Where actions of each site are written.
See here to know how it's written.
static/config.build.json The built config of config.json.
โ›”๏ธ Don't edit it, it'll be updated automatically.

๐ŸŒˆ Contributor Friendly

How Can I Contribute ? (my advice ๐Ÿ˜‡)

1๏ธโƒฃ Find the file where is written "the adblock killer".

I usualy use chrome devtools/networks and simply search for something likes "adblock" in javascript sources.

2๏ธโƒฃ Then find the specific "code instruction" that spot your adblock.

For example for tf1.fr, I found this line that informs the website (if "e == true"), that user has an extension adblock by debugging the javascript code.

this.adblockIsActivated(function(e){if(e) //...

By modifying the variable e to false, I disable the adblock killer.

3๏ธโƒฃ Write Your configuration.

I write a RegExp that can replace that instruction:
/this\.adblockIsActivated\(function\((\w+)\)\{if\(\w\)/
ย  ย  (Written as: {"from": "this\\.adblockIsActivated\\(function\\((\\w+)\\)\\{if\\(\\w\\)"} in the config.json)

I write the replaced content:
"this.adblockIsActivated(function($1){if(false)"
ย  ย  (Written as: {"to": "this.adblockIsActivated(function($1){if(false)"} in the config.json)

Note: Use the RegExp Block to match any variable name. Variable name can be changes during minor patch by the website owner. Eg. function(e) can became function(a) in a different webpack build.

4๏ธโƒฃ Try Your Fix.

I update the config.json by respecting this template.
I npm run build:config to build a new config.build.json.
I npm start to build the extension.
Finaly I load the builded extension to test it in my browser.

5๏ธโƒฃ Make Your PR ๐Ÿ™‚

Fork the repository if isn't yet done.
Push your contributions. And wait feedback ! ๐ŸŽ‰


๐Ÿ“ƒ Configuration (config.json)

The config.json contains an array of configuration.

Configuration Template

Key Type Value Example Description
action string "replace"
"redirect"
"cancel"
"replace" The action of your configuration.
name string any "6play" The website name.
pattern string any "https://www.6play.fr/player-fw-*" The Chrome Pattern URL.
url string any "https://www.6play.fr/player-fw-d18b7b5d33.bundle.js" The URL of the adblock killer script.

Replace Configuration

Key Type Example Description
from string (RegExp) "this\\.adblockIsActivated\\(function\\((\\w+)\\)\\{if\\(\\w+\\)" The excaped RegExp of the instruction to be replace.
to string "this.adblockIsActivated(function($1){if(false)" The replaced string to disable the adblock killer.

โš ๏ธ Any Issue ? Find a website with an adblock killer ?

Go HERE and explain me what's wrong. ๐Ÿค™๐Ÿป

โœ… Todo

  • Add Redirect and Cancel action documentation.

no-adb-killer's People

Contributors

lucasmrdt avatar

Watchers

James Cloos avatar  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.