// ==UserScript==
// @name          YTMND - change search to method "get"
// @namespace     http://nullprogram.com
// @description   The adv. search uses post instead of get, which is wrong.
// @version       0.0.1
// @copyright     2009, Christopher Wellons (http://nullprogram.com)
// @license       ISC license; http://isc.org/software/license;
// @include       http://ytmnd.com/search*
// @include       http://*.ytmnd.com/search*
// ==/UserScript==

if (window.location.href.match(/\/search$/)) {      // Detect POST
    var links = document.getElementsByTagName('a');
    for (var i = 0; i < links.length; i++) {
	var link = links[i];
	if (link.href.search(/\/search\?q=/) != -1) {
	    window.location.href = link.href;       // Redirect to short GET
	    break;
	}
    }
}
