Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save hulet/1260502 to your computer and use it in GitHub Desktop.

Select an option

Save hulet/1260502 to your computer and use it in GitHub Desktop.
Re-enable Google Keyboard Shortcuts in Chrome on OS X, by editing cookie database directly
#!/bin/sh
# Force Google Keyboard Shortcuts experimental search in Chrome
COOKIEJAR=~/Library/Application\ Support/Google/Chrome/Default/Cookies
OLDCOOKIEVAL=$(sqlite3 "$COOKIEJAR" "select value from cookies where host_key = '.google.com' and name = 'PREF';")
NEWCOOKIEVAL=$(echo $OLDCOOKIEVAL | sed 's/GM=.*\:S=/GM=1\:ES=WBS\:S=/')
sqlite3 "$COOKIEJAR" "update cookies set value = '$NEWCOOKIEVAL' where host_key = '.google.com' and name = 'PREF';"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment