Remove script “epiphany”
This commit is contained in:
parent
4016ac80ed
commit
ad49284b2f
1 changed files with 0 additions and 57 deletions
57
epiphany
57
epiphany
|
|
@ -1,57 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
CONFIG_DIR="$HOME/.config/epiphany"
|
|
||||||
COOKIES="cookies.sqlite"
|
|
||||||
WHITELIST="cookies.whitelist.txt"
|
|
||||||
LOCALSTORAGE_DIR="$HOME/.local/share/epiphany/localstorage"
|
|
||||||
|
|
||||||
|
|
||||||
# Run Epiphany
|
|
||||||
/usr/bin/epiphany $@
|
|
||||||
RC=$?
|
|
||||||
if [[ $RC != 0 ]]; then
|
|
||||||
exit $RC
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
### Delete cookies ###
|
|
||||||
# Go to config directory
|
|
||||||
cd "$CONFIG_DIR"
|
|
||||||
|
|
||||||
# Check cookie file
|
|
||||||
if [ ! -e "$COOKIES" ]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check whitelist
|
|
||||||
if [ ! -e "$WHITELIST" ]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Read whitelist
|
|
||||||
domainList=()
|
|
||||||
while read domain
|
|
||||||
do
|
|
||||||
if [ -n "$domain" ]; then
|
|
||||||
domainList=(${domainList[@]} $domain)
|
|
||||||
fi
|
|
||||||
done < "${WHITELIST}"
|
|
||||||
|
|
||||||
# Join whitelist to string
|
|
||||||
function join {
|
|
||||||
local IFS="$1";
|
|
||||||
shift;
|
|
||||||
echo "$*";
|
|
||||||
}
|
|
||||||
domainString=`join , "${domainList[@]}"`
|
|
||||||
domainString=\'${domainString//,/\',\'}\'
|
|
||||||
|
|
||||||
# Delete cookies
|
|
||||||
sqlite3 cookies.sqlite "DELETE FROM moz_cookies WHERE host NOT IN (${domainString});"
|
|
||||||
|
|
||||||
|
|
||||||
### Delete locale storage ###
|
|
||||||
cd "$LOCALSTORAGE_DIR"
|
|
||||||
rm *.localstorage
|
|
||||||
if [ -e "StorageTracker.db" ]; then
|
|
||||||
rm StorageTracker.db
|
|
||||||
fi
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue