Created
November 2, 2020 14:39
-
-
Save mackuba/f2e7fa1c653fb0c8dc89436eb8940c8b to your computer and use it in GitHub Desktop.
Script to hide cookier banner in Deezer's Electron app
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
#!/bin/bash | |
set -e | |
set -x | |
ARCHIVE="app.asar" | |
WORKDIR="deezer_unpacked" | |
TMPFILE="/tmp/deezerupdate.txt" | |
cd /Applications/Deezer.app/Contents/Resources/ | |
rm -rf $WORKDIR | |
asar extract $ARCHIVE $WORKDIR | |
for f in `grep -lR "this.state.hasConsented?null" $WORKDIR`; do | |
cat $f | sed -e 's/\!0===this\.state\.hasConsented\?null/!this.state.hasConsented?null/g' > $TMPFILE | |
mv $TMPFILE $f | |
done | |
asar pack $WORKDIR $ARCHIVE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment