// Fancast search ubiquity verb if(typeof(KFDotNet) == 'undefined') { KFDotNet = {}; } jQuery.extend(KFDotNet, { fancast_util: { generate_query: function(searchText){ var location = "http://cimjoyent.ath.cx/~kfitzpat/fancastSearchProxy/searchProxy.php?q="+escape(searchText); return location; } } }); CmdUtils.CreateCommand({ name: "fancast", homepage: "http://gist.github.com/10509", author: { name: "Kevin Fitzpatrick", email: "kevin.m.a.fitzpatrick@gmail.com"}, description: "Searches Fancast.com for the movie, TV show or person you enter.", icon: "http://www.fancast.com/favicon.ico", takes: {"entity": noun_arb_text}, preview: function(pblock, input) { var searchText = input.text; searchUrl = KFDotNet.fancast_util.generate_query(searchText) if(input.text == '') { pblock.innerHTML = "Type something to Search Fancast.com."; } else { var preview = "
Search for \"" + searchText + "\"
"; pblock.innerHTML = preview; jQuery.ajax( { type:"GET", url: searchUrl, success: function(results){ var filteredResults = jQuery(results).find("entities > *").not("[role]").not("[rel='search']"); var template = "