Created
September 29, 2011 22:26
-
-
Save fancyremarker/1252109 to your computer and use it in GitHub Desktop.
Re-enable Google Keyboard Shortcuts in Chrome on OS X, by editing cookie database directly
This file contains hidden or 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/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=[^:]*:/:/' | sed 's/:ES=[^:]*:/:/' | sed 's/:S=/:GM=1:ES=WBS:S=/') | |
sqlite3 "$COOKIEJAR" "update cookies set value = '$NEWCOOKIEVAL' where host_key = '.google.com' and name = 'PREF';" |
Uh, another note... apparently if you visit the Experimental Search page (linked in the previous comment), your cookies will be reset to opt you out of the Keyboard Shortcuts experiment again. So don't click the link...
This doesn't work anymore. Google has officially killed the Keyboard Shortcuts experiment. :-(
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For anyone who installed the Google Keyboard Shortcuts "Search Experiment" (formerly listed here, but evidently no longer supported), cleared their cookies, and wants their Keyboard Shortcuts back, run the above script.
It should also work for other browser/OS combinations that use SQLite for the cookie database (e.g., Firefox). Just change the value of the COOKIEJAR variable.