Skip to content

Instantly share code, notes, and snippets.

@fakechris
Created March 31, 2012 07:44
Show Gist options
  • Save fakechris/2260602 to your computer and use it in GitHub Desktop.
Save fakechris/2260602 to your computer and use it in GitHub Desktop.
Javascript bookmartlet that swith between google&baidu
javascript:window.location.href=window.location.href.match(/google/)?'http://www.baidu.com/s?ie=utf-8&wd='+window.location.href.split('&q=')[1].split('&')[0]:'http://www.google.com/search?ie=UTF-8&q='+window.location.href.split('&wd=')[1].split('&')[0];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment