Fix scrolling functionality
[WebThing.git] / plugins / DefaultPage.cs
1 using System;
2 using System.Text.RegularExpressions;
3 using bytex64.WebThing;
4
5 public class DefaultPage : WebThingPlugin {
6     public override void Init(WebThing wt) {
7         if (Config.Arguments.Length > 0) {
8             foreach (string arg in Config.Arguments)
9                 wt.OpenTab(arg);
10         } else if (Config.Options.ContainsKey("DefaultPage")) {
11             string[] pages = Regex.Split(Config.Options["DefaultPage"], @"\s+");
12             foreach (string page in pages)
13                 wt.OpenTab(page);
14         }
15     }
16 }