X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=plugins%2FGoogleSearch.cs;fp=plugins%2FGoogleSearch.cs;h=7b1b542709a47c2507a9ea58bd317517e5e74b2f;hb=11835c28c3407f9bbd4aa68b875a528d13ff0d73;hp=0000000000000000000000000000000000000000;hpb=b244412c1fbb99111bf820bb72f5b6146174405f;p=WebThing.git diff --git a/plugins/GoogleSearch.cs b/plugins/GoogleSearch.cs new file mode 100644 index 0000000..7b1b542 --- /dev/null +++ b/plugins/GoogleSearch.cs @@ -0,0 +1,10 @@ +using System; +using bytex64.WebThing; +using System.Text.RegularExpressions; + +public class GoogleSearch : WebThingPlugin, ISearchPlugin { + public string SearchTransform(string search) { + string[] words = Regex.Split(search, @"\s+"); + return String.Format("http://google.com/search?q={0}", String.Join("%20", words)); + } +}