Greasemonkey - change received email content in Gmail

Discussion in 'JavaScript' started by PoPSiCLe, Sep 19, 2009.

  1. #1
    Hi.
    I regularly get user registration emails to my Gmail-account.

    This is an HTML-email, where the different user data is listed in a <dl>, with a description in a <dt> and the actual info in a corresponding <dd>.

    What I'm trying to do is make a greasemonkey-script that will take a specific <dt> and change the content in the corresponding <dd> from the user's name, to a facebook-link with the user's name as the search parameter.

    So, example:
    
    <dt>First- and sur name</dt>
    <dd>Noname nonamelast</dd>
    
    HTML:
    should be changed into something like this:
    
    <dt>First and sur name</dt>
    <dd><a href="facebook-search-link with the user's name added as search criteria">Noname nonamelast</a></dd>
    
    HTML:
    Reason I have to do it this way is that I don't have direct access to the code sending me the email - hence I can't add an ID or class or anything like that either, and the <dl>, <dt>, <dd> (actually, more or less the whole email) got no IDs, classes etc. to hang this on.

    Anyone able to help me with this? I'm still very much a javascript noob, so small steps please :)
     
    PoPSiCLe, Sep 19, 2009 IP