Saturday, 2. February 2008, 14:15:42
google, Opera, create search

Google supports several cool features. One is searching a specific site or even a topdomain. By typing "sennheiser px 100 site:no" you can search for Sennheiser PX 100 only for norwegian sites. (And by the way,
Sennheiser PX 100 and MPX 100 are
awesome!) But what if you want a specific "search only norwegian domains" added to Opera? I'll show you how

. Go to
Google and create a search.

Expand details in the dialog and look at the search query. Servers will separate all the values by the "and" sign (&). For Google, the interesting part is the 'q' value. I've highlighted the interesting part in the image.
When you select an input and choose "Create Search", Opera does some light processing and finds which part you want to be variable. For the variable, Opera puts "%s" and will insert what you want to search for where the "%s" is. Everything else is left alone, which means that you can insert more text if you want! So instead of it saying "q=%s", you can change it to say "q=%s site:no". Give the new search a keyword, such as "gn" (for google norway) and click "Ok". Now you're done, and the newly created search will always add " site:no" to any search query you're making!
Sunday, 15. April 2007, 23:44:51
google, google video, userjs, youtube
I like watching documentaries on Google Video, but with Googles aquisition of YouTube they now also include search results from YouTube when searching from Google Video.
I didn't like this very much, so instead of adding site:video.google.com to every query manually, I wrote a UserJS that adds a default site search button. Enjoy.
How to enable UserJS
- Put the user javascript file in a folder along with all other scripts for the site you wish to alter. My personal preference is to name the folders by domain, so for Google Video the folder name would be "video.google.com". I also recommend placing all such folders inside a "userjs" folder.
- Go to the site in question. In this instance that would be http://video.google.com/.
- Right-click on an empty space to bring up the page context menu.
- Select "Edit site preferences...".
- Go to the "Scripting" tab and click "Choose" besides the text box at the bottom.
- Select the folder where you placed the sitesearch.js file you downloaded from this post. You will probably need to restart Opera before the script becomes active.
- You should now see a button titled "Search Google Video" next to the search box at Google Video, just before the regular "Search" that was already there and still functions as normal.