mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-07 10:58:25 +02:00
Remove ads and cookie banners from HTML snapshots (#695)
* integrate ublock with single-file * reuse chromium profile
This commit is contained in:
13
scripts/setup-ublock.sh
Executable file
13
scripts/setup-ublock.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
rm -rf ublock0.chromium
|
||||
|
||||
TAG=$(curl -sL https://api.github.com/repos/gorhill/uBlock/releases/latest | jq -r '.tag_name')
|
||||
DOWNLOAD_URL=https://github.com/gorhill/uBlock/releases/download/$TAG/uBlock0_$TAG.chromium.zip
|
||||
curl -L -o uBlock0.zip $DOWNLOAD_URL
|
||||
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
|
||||
mv temp.json ./uBlock0.chromium/assets/assets.json
|
||||
|
||||
mkdir -p chromium-profile
|
Reference in New Issue
Block a user