2023-05-01 13:09:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
truncate -s 0 build/YT-LIST
|
|
|
|
|
|
|
|
while read -r channel; do
|
|
|
|
cat <<-EOF >> build/YT-LIST
|
|
|
|
# Blocking youtube channel: ${channel}
|
|
|
|
www.youtube.com##a[href*="/${channel}"]:upward(5)
|
2023-05-06 14:13:32 +00:00
|
|
|
www.youtube.com##.yt-formatted-string.style-scope.yt-simple-endpoint[href="/${channel}"]:upward(13)
|
2023-05-01 13:09:19 +00:00
|
|
|
|
|
|
|
EOF
|
|
|
|
done < yt-channels
|
|
|
|
|
|
|
|
truncate -s 0 build/SITES-LIST
|
|
|
|
|
|
|
|
while read -r hostname; do
|
|
|
|
cat <<-EOF >> build/SITES-LIST
|
|
|
|
# Blocking site ${hostname} from google search
|
|
|
|
www.google.*##.g:has(a[href*="${hostname}"])
|
|
|
|
www.google.*##a[href*="${hostname}"]:upward(1)
|
|
|
|
|
|
|
|
EOF
|
|
|
|
done < sites
|