Created
August 22, 2011 21:55
-
-
Save son0fhobs/1163723 to your computer and use it in GitHub Desktop.
Firegestures - Search Google w/in Past Year
This file contains 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
/** | |
* Author: | |
* David Hobson | |
* http://www.virtualidstudios.com | |
* | |
* Goal: Update Google Search to within past year | |
* Details: | |
* While on Google Search Page. | |
* Changing Search options with a Gesture. Current one changes search to within year. | |
* | |
* On first line, change part in quotes toward end. | |
* Year: &tbs=qdr:y | |
* Month: &tbs=qdr:m | |
* Week: &tbs=qdr:w | |
* Day: &tbs=qdr:d | |
* | |
* More options in comments below | |
*/ | |
const URL = window.content.location.href+"&tbs=qdr:y"; | |
const IN_NEW_TAB = false; | |
const IN_BACKGROUND = false; | |
if (IN_NEW_TAB) | |
gBrowser.loadOneTab(URL, null, null, null, IN_BACKGROUND, false); | |
else | |
gBrowser.loadURI(URL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I know, this is painfully detailed, but I hate it when people are too vague.
This is designed to grab the url, edit it accordingly, paste it back in, and refresh the page with the new url. Thus it can be applied to virtually any url customization need.
For more google search changes, first run a search. Copy the url. Run another search using the search tool of choice. Copy url and compare. The difference is the bit of code that implemented the search tool. Use that to replace the "&tbs=qdr:y" Of course you can stack as many as you want one after the other in that same string.