From 22ffecbb9dc832aea66ca00cfe9cfd1f29ab7c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20I=C3=9Fbr=C3=BCcker?= Date: Mon, 15 Apr 2024 19:33:25 +0200 Subject: [PATCH] Make blocking cookie banners more reliable (#699) --- docker/alpine.Dockerfile | 2 +- docker/default.Dockerfile | 2 +- scripts/setup-ublock.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/alpine.Dockerfile b/docker/alpine.Dockerfile index 039d6e2e..b81f1183 100644 --- a/docker/alpine.Dockerfile +++ b/docker/alpine.Dockerfile @@ -112,7 +112,7 @@ RUN TAG=$(curl -sL https://api.github.com/repos/gorhill/uBlock/releases/latest | unzip uBlock0.zip # Patch assets.json to enable easylist-cookies by default RUN curl -L -o ./uBlock0.chromium/assets/thirdparties/easylist/easylist-cookies.txt https://ublockorigin.github.io/uAssets/thirdparties/easylist-cookies.txt -RUN jq '."fanboy-cookiemonster" |= del(.off) | ."fanboy-cookiemonster".contentURL += ["assets/thirdparties/easylist/easylist-cookies.txt"]' ./uBlock0.chromium/assets/assets.json > temp.json && \ +RUN jq '."assets.json" |= del(.cdnURLs) | ."assets.json".contentURL = ["assets/assets.json"] | ."fanboy-cookiemonster" |= del(.off) | ."fanboy-cookiemonster".contentURL += ["assets/thirdparties/easylist/easylist-cookies.txt"]' ./uBlock0.chromium/assets/assets.json > temp.json && \ mv temp.json ./uBlock0.chromium/assets/assets.json diff --git a/docker/default.Dockerfile b/docker/default.Dockerfile index 7ffb6b02..7b6fd39f 100644 --- a/docker/default.Dockerfile +++ b/docker/default.Dockerfile @@ -110,7 +110,7 @@ RUN TAG=$(curl -sL https://api.github.com/repos/gorhill/uBlock/releases/latest | unzip uBlock0.zip # Patch assets.json to enable easylist-cookies by default RUN curl -L -o ./uBlock0.chromium/assets/thirdparties/easylist/easylist-cookies.txt https://ublockorigin.github.io/uAssets/thirdparties/easylist-cookies.txt -RUN jq '."fanboy-cookiemonster" |= del(.off) | ."fanboy-cookiemonster".contentURL += ["assets/thirdparties/easylist/easylist-cookies.txt"]' ./uBlock0.chromium/assets/assets.json > temp.json && \ +RUN jq '."assets.json" |= del(.cdnURLs) | ."assets.json".contentURL = ["assets/assets.json"] | ."fanboy-cookiemonster" |= del(.off) | ."fanboy-cookiemonster".contentURL += ["assets/thirdparties/easylist/easylist-cookies.txt"]' ./uBlock0.chromium/assets/assets.json > temp.json && \ mv temp.json ./uBlock0.chromium/assets/assets.json diff --git a/scripts/setup-ublock.sh b/scripts/setup-ublock.sh index b713fb82..415f0d65 100755 --- a/scripts/setup-ublock.sh +++ b/scripts/setup-ublock.sh @@ -7,7 +7,7 @@ unzip uBlock0.zip rm uBlock0.zip curl -L -o ./uBlock0.chromium/assets/thirdparties/easylist/easylist-cookies.txt https://ublockorigin.github.io/uAssets/thirdparties/easylist-cookies.txt -jq '."fanboy-cookiemonster" |= del(.off) | ."fanboy-cookiemonster".contentURL += ["assets/thirdparties/easylist/easylist-cookies.txt"]' ./uBlock0.chromium/assets/assets.json > temp.json +jq '."assets.json" |= del(.cdnURLs) | ."assets.json".contentURL = ["assets/assets.json"] | ."fanboy-cookiemonster" |= del(.off) | ."fanboy-cookiemonster".contentURL += ["assets/thirdparties/easylist/easylist-cookies.txt"]' ./uBlock0.chromium/assets/assets.json > temp.json mv temp.json ./uBlock0.chromium/assets/assets.json mkdir -p chromium-profile