Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
Help with changing imgur css, for a friend list.
Post Body

My goal: I have a list of names for a friend list. If any user is on it, change their post color.

It appears to work in fiddle, http://jsfiddle.net/j935k/7/

But fails on imgur.I've tried many options. (I do get console.log output, so I know it is loading it. )

some of my attempts:

only shows the first user, It should create a list of every div.author's first-a-child.

$("div.author a:first").each(function() {
    var x = $(this).text();    
    if( nameInFavs(x)) {
            $(this).css("color", "orange");
    }
});

This matches nothing.

The urls are always in the format of

    <a href="/user/foo">foo</a>

so I tried to partial match, or prefix-match without luck. a[href~='/user']

I've written userscripts on other webpages, What am I doing wrong? Is there something special happeneing at imgur?

Code from jsfiddle:

var favs = new Array("foo", "bar");

function nameInFavs(n) {
    if(favs.indexOf(n) != -1)
        return true;
    return false;
}

$("div.author a").each(function(i) {
    console.log("i= "   i);
    var x = $(this).text();

    if( nameInFavs(x)) {
        $(this).css("color","orange");
    }
});

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
69,042
Link Karma
3,137
Comment Karma
65,597
Profile updated: 1 day ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 years ago