|
| 1 | +# Getting started |
| 2 | + |
| 3 | +## Use both repositories |
| 4 | + |
| 5 | +```zsh |
| 6 | +git clone git@gitlab.com:ph00lt0/blocklists.git |
| 7 | +cd blocklists |
| 8 | +git remote add github git@github.com:ph00lt0/blocklists.git |
| 9 | +``` |
| 10 | + |
| 11 | +## Init project |
| 12 | + |
| 13 | +```zsh |
| 14 | +python3 -m venv blocklist |
| 15 | +source blocklist/bin/activate |
| 16 | +pip install -r requirements.txt |
| 17 | +# add simple command to open project and venv by just typing block |
| 18 | +echo "$(pwd)" > ~/.blocklist |
| 19 | +echo "alias block='cd \$(cat ~/.blocklist) && source \$(cat ~/.blocklist)/blocklist/bin/activate'" >> ~/.zshrc |
| 20 | +echo "alias block='cd \$(cat ~/.blocklist) && source \$(cat ~/.blocklist)/blocklist/bin/activate'" >> ~/.bashrc |
| 21 | +echo "python cleanup.py" > .git/hooks/pre-commit |
| 22 | +chmod +x .git/hooks/pre-commit |
| 23 | +``` |
| 24 | + |
| 25 | +## Insert |
| 26 | + |
| 27 | +```zsh |
| 28 | +block |
| 29 | +python insert.py |
| 30 | +``` |
| 31 | + |
| 32 | +Insert supports, domains and filepaths. |
| 33 | + |
| 34 | +If you enter a domain name, https:// or http and trailing / are automatically being removed if included. |
| 35 | +So https://annoyingtrackers.com/ becomes: annoyingtrackers.com |
| 36 | + |
| 37 | +Hit enter, and the domain will be added to the list. |
| 38 | + |
| 39 | +## Badlist |
| 40 | + |
| 41 | +```zsh |
| 42 | +block |
| 43 | +python badlist.py |
| 44 | +``` |
| 45 | + |
| 46 | +Badlist supports filepaths and domains. |
| 47 | + |
| 48 | +## Made a mistake? |
| 49 | + |
| 50 | +Make your changes in blocklist.txt and commit. |
| 51 | + |
| 52 | +## Remove a URL parameter (legacy) |
| 53 | + |
| 54 | +```zsh |
| 55 | +./insert-filter-remove-parameter.sh |
| 56 | +``` |
| 57 | + |
| 58 | +OR |
| 59 | + |
| 60 | +```zsh |
| 61 | +insert-filter-remove-parameter-domain.sh |
| 62 | +``` |
| 63 | +Carefully choose whether to remove a parameter from only a single domain or globally. A clear tracker can be removed from all websites, but a UID may be required for some websites to operate. Generic UID names should not be removed globally. |
| 64 | + |
| 65 | +Depending on the script enter the domain name and the parameter to remove. The script will do the rest. |
| 66 | + |
| 67 | +## Remove element by class or id (legacy) |
| 68 | + |
| 69 | +```zsh |
| 70 | + |
| 71 | +./insert-filter-remove-element.sh |
| 72 | +``` |
| 73 | + |
| 74 | +- Enter the domain |
| 75 | +- Enter the identifier, following given instructions |
| 76 | + |
| 77 | +Hit enter, and the rule will be added to the blocklist. Note that this won't be in the pihole blocklist and work for DNS only filters |
| 78 | + |
| 79 | +## Add filter to remove a class from element (legacy) |
| 80 | + |
| 81 | +```zsh |
| 82 | +./insert-filter-remove-class.sh |
| 83 | +``` |
| 84 | + |
| 85 | +Do you want to remove a class from an element? For example a class making the body disappear to show a cookie banner? |
| 86 | + |
| 87 | +- Enter the domain name, the class, and the element to remove it from |
| 88 | + |
| 89 | +Hit enter, and the class removal rule will be added |
| 90 | +Note that all rules are set to stay active, so that they will continue to work on page refreshes as well as with async content. |
| 91 | + |
| 92 | +## Add filter to remove hidden overflow (legacy) |
| 93 | + |
| 94 | +```zsh |
| 95 | +./insert-filter-remove-overflow-hidden.sh |
| 96 | +``` |
| 97 | + |
| 98 | +- Enter the domain name |
| 99 | + |
| 100 | +Hit enter, and the hidden overflow will be removed from the body |
0 commit comments