Greasy Fork is available in English.

Something Awful Friends Highlight

Highlights posts of friends on Something Awful.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Something Awful Friends Highlight
// @namespace    http://mathemaniac.org
// @version      1.0.1
// @description  Highlights posts of friends on Something Awful.
// @match        *://forums.somethingawful.com/usercp.php*
// @match        *://forums.somethingawful.com/showthread.php*
// @copyright    2012-2016, Sebastian Paaske Tørholm
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js
// @grant        GM_setValue
// @grant        GM_getValue
// ==/UserScript==

var location = "" + document.location;

// Scrape buddy list from user control panel
if (location.match(/usercp\.php/) && $('#buddylist').length) {
    var buddies = [];
    $('#buddylist a[href *= "member.php"]').each(function () {
        buddies.push($(this).attr('title'));
    });

    GM_setValue("buddylist", buddies);
} else {
    var buddies = GM_getValue("buddylist", []);

    $(".post").each( function () {
        console.log("Post: ", this);
        var author = $("dt.author", this);
        if (author && $.inArray(author.first().text(), buddies) >= 0) {
            $("tr td", this).css( {
                "background-color": "lightgreen"
            } );
        }
    } );
}