X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=plugins%2FDefaultPage.cs;h=f7076e5a3705748daacbc817681c5cba1acc0193;hb=e754c4d8175a3e5b381d27b8eb5a11a8d6085d7f;hp=e1a001008b818f96f9455fd449d21b3dd234e837;hpb=126f2111e41f6b2595ffde1de6828ef12246e545;p=WebThing.git diff --git a/plugins/DefaultPage.cs b/plugins/DefaultPage.cs index e1a0010..f7076e5 100644 --- a/plugins/DefaultPage.cs +++ b/plugins/DefaultPage.cs @@ -1,8 +1,14 @@ using System; using bytex64.WebThing; -public class Plugin { - public Plugin(WebThing wt) { - wt.WebView.Open("http://dominionofawesome.com/"); - } +public class DefaultPage : WebThingPlugin { + public override void Init(WebThing wt) { + if (Config.Arguments.Length > 0) { + wt.OpenUri(Config.Arguments[0]); + } else if (Config.Options.ContainsKey("DefaultPage")) { + wt.OpenUri(Config.Options["DefaultPage"]); + } else { + wt.OpenUri("http://dominionofawesome.com/"); + } + } }