Technorati English Search Results

By Jordon Kalilich Last update Apr 29, 2007 — Installed 148 times.
// Version 0.3 - April 29, 2007
// By Jordon Kalilich - www.theworldofstuff.com
//
// ==UserScript==
// @name          Technorati English Search Results
// @namespace     http://www.theworldofstuff.com/greasemonkey/
// @description   Limits your Technorati search results to English-language posts.
// @include       http://www.technorati.com/search/*
// @include       http://technorati.com/search/*
// @include       http://www.technorati.com/tag/*
// @include       http://technorati.com/tag/*
// @include       http://www.technorati.com/posts/tag/*
// @include       http://technorati.com/posts/tag/*
// ==/UserScript==

/*
Note: Once Technorati has recognized your language, it should return your
search results in that language, in which case this script would not be 
necessary. But in the odd event that you're looking at search results in 
another language and Technorati starts giving you all your search results in 
that language, this script could come in handy. But its main purpose is for
those who do an occasional Technorati search from the search bar to get better
results more quickly.
*/

// To automatically get results in a language whose ISO code is 'xx', replace
// 'en' with 'xx' on the line below.
var language = 'en';
// (Note: this will only work if the language is recognized by Technorati.)

var location = window.location.href;
if (location.indexOf('language=') == -1) {
   if (location.indexOf('?') > -1) {
      window.location.replace(location + '&language=' + language);
   }
   else {
      window.location.replace(location + '?language=' + language);
   }
}