Skip to content

Instantly share code, notes, and snippets.

@mackuba
Created November 2, 2020 14:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mackuba/f2e7fa1c653fb0c8dc89436eb8940c8b to your computer and use it in GitHub Desktop.
Script to hide cookier banner in Deezer's Electron app
#!/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