Skip to content

Instantly share code, notes, and snippets.

@mrinterweb
Created August 2, 2009 23:41
Show Gist options
  • Save mrinterweb/160256 to your computer and use it in GitHub Desktop.
Save mrinterweb/160256 to your computer and use it in GitHub Desktop.
/* Firefox Google By Date bookmark by Sean McCleary
* I love to search google with a date criteria, but I always was upset with the advanced search interface
* To use this, in Firefox, Go to Bookmarks->Organize Bookmarks...->Bookmarks Menu. Then, add new bookmark.
* Name: Google by Date
* Location: <copy and paste javascript below in this field>
* Keyword: gbd
*
* Useage Example: Say you wanted to search for "funny lolcats" and you only want to see results from the last 5 weeks.
* type in Firefox's location bar
* gbd funny lolcats w5
* last argument is used as date arg such as w3 #=> 3 weeks ago, y2 #=> 2 years ago
*/
javascript:var%C2%A0s='%s'; url='http://www.google.com/search?hl=en&as_q=%s&as_qdr=%s'; var args = %C2%A0s.match(/^(.*)(\s.*)$/); arg1 = escape(args[1]); arg2 = escape(args[2].replace(' ', '')); parts = url.split('%s'); location.replace(parts[0]+arg1+parts[1]+arg2, '< BR>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment