-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hard-coded circumvention logic (+ IL defuser)
* Simplify 'example' extension * Add circumvention module and entry-point in cosmetics injection * Clean-up cjs and esm bundles * Remove obsolete logic to override user-agent in content-script * Simplify travis config (using new pre* hooks) * Consolidate 'fetch' module (with metadata about lists)
- Loading branch information
Showing
25 changed files
with
841 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
|
||
.PHONY: content-script.bunble.js background.bundle.js build/example watch clean | ||
.PHONY: all watch | ||
|
||
ROLLUP="../node_modules/.bin/rollup" | ||
|
||
all: content-script.bundle.js background.bundle.js | ||
|
||
build/example: | ||
tsc -p tsconfig.json --module ES6 --outDir build | ||
|
||
content-script.bundle.js: build/example | ||
${ROLLUP} -c rollup.content.js | ||
|
||
background.bundle.js: build/example | ||
${ROLLUP} -c rollup.background.js | ||
all: | ||
npx tsc -p . | ||
npx rollup -c rollup.config.js | ||
|
||
watch: | ||
concurrently 'tsc -p tsconfig.json --module ES6 --outDir build --watch' 'rollup -c rollup.content.js --watch' 'rollup -c rollup.background.js --watch' | ||
npx concurrently 'tsc -p . --watch' 'rollup -c rollup.config.js --watch' | ||
|
||
clean: | ||
rm -frv *.bundle.js | ||
rm -frv *.iife.js | ||
rm -frv build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# Minimal Content Blocker | ||
|
||
This is a minimal webextension doing adblocking/antitracking using most popular | ||
block-lists. It is meant as a very thin wrapper around the [adblocker](https://github.com/cliqz-oss/adblocker) | ||
library. | ||
This is a minimal webextension doing adblocking/antitracking using most | ||
popular block-lists. It is meant as a very thin wrapper around the | ||
[adblocker](https://github.com/cliqz-oss/adblocker) library. You can use it to | ||
debut the adblocker, or test new features. | ||
|
||
## Building | ||
## Workflow | ||
|
||
1. Build the extension: `make all` | ||
2. Load it in Firefox or Chromium by using the "Load unpacked extension" feature | ||
1. `make watch` will build and monitor for changes | ||
2. Open your browser and load "unpacked extension" from the `example` folder | ||
3. On re-build, reload the extension in browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
|
||
|
||
const plugins = [ | ||
resolve(), | ||
commonjs(), | ||
]; | ||
|
||
export default [ | ||
{ | ||
input: './build/example/background.js', | ||
output: { | ||
file: 'background.iife.js', | ||
format: 'iife', | ||
}, | ||
plugins, | ||
}, | ||
{ | ||
input: './build/example/content-script.js', | ||
output: { | ||
file: 'content-script.iife.js', | ||
format: 'iife', | ||
}, | ||
plugins, | ||
}, | ||
]; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "build", | ||
"noImplicitAny": false | ||
}, | ||
"files": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export { default as CosmeticsInjection } from './src/cosmetics-injection'; | ||
export { overrideUserAgent } from './src/cosmetics-injection'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.