<?xml version="1.0" encoding="utf-8"?>
<service name="typepad"
         version="$Id: typepad.xml 21200 2008-11-25 01:24:08Z manish $"
         xmlns="http://www.flock.com/web-detective#">

  <strings>
    <string name="domains" value="typepad.com" />

    <string name="homePageURL" locale="default">
      <![CDATA[http://www.typepad.com/]]>
    </string>

    <string name="homePageURL" locale="de">
      <![CDATA[http://www.sixapart.com/de/typepad/]]>
    </string>

    <string name="loginURL" locale="default">
      <![CDATA[http://www.typepad.com/t/app]]>
    </string>

    <string name="loginURL" locale="de">
      <![CDATA[http://www.typepad.com/t/app?portal=de]]>
    </string>
  </strings>

  <sessioncookies>
    <cookie host="www.typepad.com" name="session_id" path="/" />
    <cookie host=".typepad.com" name="s_sq" path="/" />
    <cookie host=".typepad.com" name="s_cc" path="/" />
  </sessioncookies>

  <detect type="signup">
    <url domain="typepad.com">
      <path contains="/t/app/register" />
    </url>
    <form>
      <xpath name="username" extract="value">
        <![CDATA[//input[@name="name"]]]>
      </xpath>
      <xpath name="password" extract="value">
        <![CDATA[//input[@type="password"][@name="password"]]]>
      </xpath>
    </form>
  </detect>  
  
  <detect type="login">
    <url domain="typepad.com">
      <path contains="/t/app" />
    </url>
    <form>
      <xpath name="username" extract="value">
        <![CDATA[//input[@id="username"]]]>
      </xpath>
      <xpath name="password" extract="value">
        <![CDATA[//input[@id="password"]]]>
      </xpath>
    </form>
  </detect>

  <detect type="loggedin">
    <conditions>
      <url domain="typepad.com"/>
      <document>
        <regexp re1="username">
          <![CDATA[/welcome\sback\sto\sTypePad/]]>
        </regexp>
      </document>
    </conditions>
  </detect>

  <detect type="loggedout">
    <url domain="typepad.com">
      <path contains="/t/app" />
      <querystring contains="__mode=logout" />
    </url>
  </detect>

  <detect type="accountinfo">
    <conditions>
      <url domain="typepad.com"/>
    </conditions>
    <results>
      <regexp re1="accountid">
        <![CDATA[/"http:\/\/([^\.]*)\.typepad\.com\/"\starget="_blank">VIEW SITE/]]>
      </regexp>
    </results>
  </detect>

  <!-- Possibly obsolete as of 2008-11-05 -->
  <detect type="accountinfo">
    <conditions>
      <url domain="typepad.com"/>
    </conditions>
    <results>
      <regexp re1="accountid">
        <![CDATA[/"http:\/\/([^\.]*)\.typepad\.com\/">VIEW SITE/]]>
      </regexp>
    </results>
  </detect>

  <detect type="changepassword">
    <url domain="typepad.com">
      <path contains="/t/app/control/profile" />
    </url>
    <document>
      <regexp re1="username">
        <![CDATA[/"http:\/\/([^\.]*)\.typepad\.com\/"\starget="_blank">VIEW SITE/]]>
      </regexp>
    </document>
    <form>
      <xpath name="password" extract="value">
        <![CDATA[//input[@type="password"][@name="pass_verify"]]]>
      </xpath>
   </form>
  </detect>

  <!-- Possibly obsolete as of 2008-11-05 -->
  <detect type="changepassword">
    <url domain="typepad.com">
      <path contains="/t/app/control/profile" />
    </url>
    <document>
      <regexp re1="username">
        <![CDATA[/"http:\/\/([^\.]*)\.typepad\.com\/">VIEW SITE/]]>
      </regexp>
    </document>
    <form>
      <xpath name="password" extract="value">
        <![CDATA[//input[@type="password"][@name="pass_verify"]]]>
      </xpath>
   </form>
  </detect>

  <detect type="ownsDocument">
    <url domain="typepad.com" />
  </detect>

</service>
