Skip to content

Instantly share code, notes, and snippets.

@noromanba
Last active January 2, 2018 02:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noromanba/b0f5f772573bd982190afba6374395cd to your computer and use it in GitHub Desktop.
Save noromanba/b0f5f772573bd982190afba6374395cd to your computer and use it in GitHub Desktop.
Privacy Badger attach tracker settings

Privacy Badger import/export tracker settings

Privacy Badger is free ads/trackers blocker by EFF, It's pretty awesome

but native import/export function is not implemented yet, see Issue

Issue

issues about import/export or sync in Firefox and Chrome-family Extension

attach local file(s)

manually backup setting file(s) by hand

Firefox

1. inspect ID

inspect ID in about:addons tab

<richlistitem xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="addon addon-view" name="Privacy Badger" type="extension" remote="false" status="installed" value="jid1-MnnxcxisBPnSXQ@jetpack" contextmenu="addonitem-popup" active="true"/>

value="jid1-MnnxcxisBPnSXQ@jetpack"

2. locate

location syntax:

$HOME/.mozilla/firefox/<PROFLE_ID>/jetpack/<EXTENSION_ID>

i.e.

~/.mozilla/firefox/<PROFLE_ID>/jetpack/jid1-MnnxcxisBPnSXQ@jetpack

PROFILE_ID is random, but perhaps XXXX.default like this;

~/.mozilla/firefox/*.default/jetpack/jid1-MnnxcxisBPnSXQ@jetpack
$ # cd extension dir
$ PB_HOME=~/.mozilla/firefox/*.default/jetpack/jid1-MnnxcxisBPnSXQ@jetpack
$ LANG=C tree $PB_HOME
.
`-- simple-storage
    `-- store.json

    1 directory, 1 file

store.json

simple-store/store.json is setting file

3. backup

copy somewhere; e.g. $HOME

$ # cp store.json <DESTINATION>
$ cp -av $PB_HOME/simple-storage/store.json ~

4. beautify (optional)

beautify json in standard env, very convenient for diff

$ cat ~/store.json | python -m json.tool
$ # stdout settings w/ 4 space indent

if you want to backup w/ Dropbox, like this

$ mkdir -p ~/Dropbox/privacybadger/simple-storage/ # if needed
$ cat ~/store.json | python -m json.tool | tee ~/Dropbox/privacybadger/simple-storage/store.json
$ # no-error, done

5. port (optional)

$ OTHER_PROFLE_PB_HOME=~/.mozilla/firefox/<OTHER_PROFLE_ID>/jetpack/jid1-MnnxcxisBPnSXQ@jetpack
$ cp -av ~/store.json $OTHER_PROFLE_PB_HOME/simple-storage/store.json

Chrome / Chromium / Vivaldi

IDKWTD, perhaps settings in DB and/or data file

config dirs

~/.config/google-chrome/<PROFLE_DIR>/
~/.config/chromium/<PROFLE_DIR>/
~/.config/vivaldi/<PROFLE_DIR>/

default <PROFLE_DIR> name is Default

search

testing

$ ag 'pkehgijcmpdhfbdbbnkijodmdjhbjlgp' *
$ ag -i 'privacy\-?badger' *

or

$ find . -print0 | xargs -0 strings -f | grep -i 'pkehgijcmpdhfbdbbnkijodmdjhbjlgp' | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment