X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=plugins%2FDefaultPage.cs;h=b534fe12ab9024cc8708e84ec32d1f4ccc552c33;hb=2744fefc32dbe9b59a570f6515d51121b8fcfbe3;hp=e1a001008b818f96f9455fd449d21b3dd234e837;hpb=126f2111e41f6b2595ffde1de6828ef12246e545;p=WebThing.git diff --git a/plugins/DefaultPage.cs b/plugins/DefaultPage.cs index e1a0010..b534fe1 100644 --- a/plugins/DefaultPage.cs +++ b/plugins/DefaultPage.cs @@ -1,8 +1,16 @@ using System; +using System.Text.RegularExpressions; 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) { + foreach (string arg in Config.Arguments) + wt.OpenTab(arg); + } else if (Config.Options.ContainsKey("DefaultPage")) { + string[] pages = Regex.Split(Config.Options["DefaultPage"], @"\s+"); + foreach (string page in pages) + wt.OpenTab(page); + } + } }