Skip to content

Simplifying Searching Specific Sites

With Google being the one of the most useful websites there are, and with the way it tends to be the place people tend to go to when looking for information online, many people set it to being the home page of their browsers. After opening a web browser, it is best to have it open to the page that one would most often need to have open, and that is likely why I haven’t found that many have had a problem with the default Mozilla Firefox home page being not much different from Google’s main page. There might be those who would prefer to use Google’s advanced search page and there are those who may prefer using iGoogle to use a more personalized version of Google. However, I wanted to personalize Google’s main page by adding some advanced search features to it. And that sounded like something that could be done with Firefox’s Greasemonkey extension.

One of the advanced features of Google that I use most often is the one for searching within specific domains or websites, as Google can be better for searching through sites than the search features included in some sites. I have often found that I like to search for YouTube videos once I get Firefox started up, and YouTube-specific searches are not going to be included on Google’s main page despite Google owning YouTube. And I did not want to use the search plugin for YouTube, which you can find and download if you click here, as I preferred to simply work with what was on the web page. So I wanted to add some functionality to the Google’s main page that would allow YouTube-specific searches, as I was getting tired of having to type in “site:www.youtube.com” after entering search terms. And I still wanted to be able to do these searches from the main Google page, rather than set my browser’s home page to the advanced search page. (And even if I did have it set to this advanced search page, I would still need to type in the domain name in the place where it needed to be entered, which I wanted to avoid.)

I am fairly new to using Greasemonkey, as it has been somewhat recently that I have found out how useful it can be. What I have liked the most about it is its ability to add the kind of functionality to web pages that I, but not necessarily others, would like to see on them. And so I decided to use Greasemonkey to make it so that I could use some of Google’s advanced search capabilities on the simple and uncluttered main Google page. I quickly wrote a Greasemonkey script that adds a button for YouTube-specific searches to Google’s main page, and to Google’s pages that display search results. After entering the search string and clicking this button, it displays search results from within youtube.com. I have found this script useful so far, as it has saved me keystrokes, mouse clicks, and time it takes to load pages. In fact, I found it very useful after I time I walked by the intersection of Yonge and Dundas Streets in Toronto, where I saw a sidewalk chalk artist suggest doing a search on YouTube for “chalk this way.” With this script, the result that he would want me to see was the first in the list of the results, and I was able to get there without having to go through YouTube.

You can click here to download this Greasemonkey script. I don’t expect many others to be very interested in using the script at this time, but I’m making it available for those who might want to use it. I should also note that this script may be something I’ll continue to work on. And as is the case with anything else I write, any feedback would be appreciated. Also worth mentioning is that this script only requires a few slight modifications for making it so it can search other sites. I’m not sure how many members of Greasemonkey’s userbase might be willing to make these slight modifications to the source code, even though in the source, it is documented where changes need to be made to make it search different sites. It is quite possible that those who use Greasemonkey can often be expected to make those kinds of changes, as Greasemonkey users may tend to be advanced Firefox users. However, I am not quite sure of this, but the topic of the level of knowledge of Greasemonkey users can be a topic for another blog entry.

2 Comments