private void RemoveRegularStylesheets(HtmlDom pageDom)
{
foreach (XmlElement link in pageDom.RawDom.SafeSelectNodes("//head/link").Cast<XmlElement>().ToArray())
{
var href = link.Attributes["href"];
if (href != null && Path.GetFileName(href.Value).StartsWith("custom"))
continue;
if (href != null && Path.GetFileName(href.Value) == "settingsCollectionStyles.css")
continue;
link.ParentNode.RemoveChild(link);
}
}