<?xml version="1.0" encoding="utf-8"?>
<service name="delicious"
         version="$Id: delicious.xml 23029 2010-06-08 09:21:21Z justin $"
         xmlns="http://www.flock.com/web-detective#">

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

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

    <string name="loginURL" locale="default">
      <![CDATA[https://secure.delicious.com/login]]>
    </string>
  </strings>

  <sessioncookies>
    <cookie host=".delicious.com" name="delicious_session" path="/"/>
    <cookie host=".delicious.com" name="delicious_auth" path="/"/>
    <cookie host=".delicious.com" name="delicious_ac4_secure_us" path="/"/>
    <cookie host=".delicious.com" name="postReg" path="/"/>
    <cookie host=".delicious.com" name="_user" path="/"/>
  </sessioncookies>

  <detect type="login">
    <url><host equals="secure.delicious.com"/></url>
    <form>
      <xpath name="username" extract="value">
        <![CDATA[[@action="https://secure.delicious.com/login"]/input[@id="username"]]]>
      </xpath>
      <xpath name="password" extract="value">
        <![CDATA[/input[@id="password"]]]>
      </xpath>
    </form>
  </detect>

  <detect type="signup">
    <url>
      <host equals="secure.delicious.com"/>
      <path contains="/register"/>
    </url>
    <form>
      <field tagname="input" name="user_name" extractas="username"/>
      <field tagname="input" name="password2" type="password" extractas="password"/>
    </form>
  </detect>

  <detect type="changepassword">
    <url>
      <host equals="secure.delicious.com"/>
      <path contains="/profile/changepw"/>
    </url>
    <document>
      <xpath name="username">
        <![CDATA[//a[@id="signedInAs"]/text()]]>
      </xpath>
    </document>
    <form>
      <xpath name="password" extract="value">
        <![CDATA[//input[@type="password"][@name="new_password_again"]]]>
      </xpath>
    </form>
  </detect>

  <detect type="loggedin">
    <url domain="delicious.com"/>
    <xpath><![CDATA[//a/@href[contains(.,"/logout")]]]></xpath>
  </detect>

  <detect type="loggedout">
    <url domain="delicious.com"/>
    <xpath><![CDATA[//div[@id="header"]//p[@id="header-auth-links"]/a//text()[contains(.,"login")]]]></xpath>
  </detect>

  <detect type="accountinfo">
    <url domain="delicious.com"/>
    <xpath name="accountid">
      <![CDATA[//strong[@id="signedInName"]/a/text()]]>
    </xpath>
  </detect>

  <!-- Obsolete as of May 28, 2010 -->
  <detect type="accountinfo">
    <url domain="delicious.com"/>
    <xpath name="accountid">
      <![CDATA[//strong[@id="signedInAs"]/a/text()]]>
    </xpath>
  </detect>

</service>
