X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;ds=sidebyside;f=plugins%2FDefaultPage.cs;h=3e99bb1f5e14cd8575a4c863696688fa578922d0;hb=02acfc22dbfa3d145d265157fdf616a950fa30c6;hp=38ed6721b8ab414c76061699d470bd254c2236a2;hpb=80865e6b884a4bb289cb4a835a6fa66b3529c872;p=WebThing.git diff --git a/plugins/DefaultPage.cs b/plugins/DefaultPage.cs index 38ed672..3e99bb1 100644 --- a/plugins/DefaultPage.cs +++ b/plugins/DefaultPage.cs @@ -1,12 +1,16 @@ using System; +using System.Text.RegularExpressions; using bytex64.WebThing; public class DefaultPage : WebThingPlugin { - public void Init(WebThing wt) { - if (wt.Arguments.Length > 0) { - wt.OpenUri(wt.Arguments[0]); - } else { - wt.OpenUri("http://dominionofawesome.com/"); + public override void Init(WebThing wt) { + if (Config.Arguments.Length > 0) { + foreach (string arg in Config.Arguments) + wt.OpenUriTab(arg); + } else if (Config.Options.ContainsKey("DefaultPage")) { + string[] pages = Regex.Split(Config.Options["DefaultPage"], @"\s+"); + foreach (string page in pages) + wt.OpenUriTab(page); } } }