Color Comments By User March 11, 2016 11:12 AM   Subscribe

I made a Greasemonkey script that allows you to assign a color of your choosing to any MeFi user and displays each user's comments in their corresponding color.

Inspired by a post-pub-trivia chat with MoonOrb, I spent a couple days hacking up a Greasemonkey script to apply a color of your choosing to any MeFi user's comments. The script puts a color picker next to the username after every comment, and choosing a color from it will turn the text (excluding links) of all of that user's comments that color. Here's a screenshot! And here's the install link!

Colors you choose persist between visits to MetaFilter. By default the plugin only affects the blue, but you can set it to include other subsites in the Greasemonkey user settings. I've tested it on recent Firefoxen on Mac and Windows. If you have feature requests or bugs and a GitHub account, you can log an issue, or just comment here.

As a bonus, this plugin causes long (500+ or so) comment threads to load very slowly, giving you time to reconsider whether you actually want to look at them! (Fun fact: I found threads to check this against by putting "Trump" in the search field. Seriously though, if anyone with experience with JS optimization has suggestions for that, I'm all ears.)
posted by valrus to MetaFilter-Related at 11:12 AM (32 comments total) 11 users marked this as a favorite

I have set all my own comments to the same color as the background so that I never have to read my nonsense.
posted by beerperson at 11:30 AM on March 11, 2016 [17 favorites]


This is neat, thank you! Now I just have to decide what color signifies "nemesis".
posted by Mrs. Pterodactyl at 11:31 AM on March 11, 2016 [5 favorites]


Black, of course.
posted by Johnny Wallflower at 11:39 AM on March 11, 2016 [2 favorites]


I don't think I'll use this, but it is quite nifty - thanks for tinkering around.

Semi-related: If anyone could get the old userpic script working again, I'd be obliged.
posted by Chrysostom at 11:43 AM on March 11, 2016


I have set all my own comments to the same color as the background so that I never have to read my nonsense.

Now, does it look blue to you, or white?
posted by Kabanos at 11:50 AM on March 11, 2016 [2 favorites]


IIRC my actual comment to valrus was "I'd love to have something like this so I could set some people to 'blue.'"

This is actually a great feature because there are a number of people who give great answers and advice over in ask but are complete knobs when commenting on fpps.
posted by phunniemee at 11:50 AM on March 11, 2016 [5 favorites]


I spent a couple days hacking up a Greasemonkey script to apply a color of your choosing to any MeFi user's comments.

Like Fark!
posted by the man of twists and turns at 11:58 AM on March 11, 2016


fpps: first-person pea shooters.
posted by Wolfdog at 12:27 PM on March 11, 2016 [1 favorite]


For those who were having difficulty with the abbreviation.
posted by Wolfdog at 12:27 PM on March 11, 2016 [1 favorite]


Bug report:
// @include http://www.metafilter.com/*
should be something like:
// @include        /^https?://(.*\.)?metafilter\.com/
for those of us who use the SSL site. Of course Greasemonkey can set it to run other sites, but the default should probably include https.

As for performance, I've been using an older but somewhat similar script that can apply styles to comments by user, maybe look at that and see what it's doing? For all I know it's even slower -- haven't looked closely at yours yet.
posted by tonycpsu at 12:27 PM on March 11, 2016 [1 favorite]


Chrysostom: "Semi-related: If anyone could get the old userpic script working again, I'd be obliged."

I didn't know that script existed, but I'm assuming it's similar to picMF, which still works.
posted by Bugbread at 3:21 PM on March 11, 2016 [1 favorite]


This seems like an excellent idea, so thanks and congratulations. I suppose it would be possible to match the text to the background color for users who annoy you, so that (without selecting the text to highlight it) you could see there was something there, but elect not to read it?
posted by uosuaq at 5:04 PM on March 11, 2016


Nice! I wrote something like this for myself once as a sort of killfile, to dim the comments of people I knew annoyed me so I didn't take them so seriously. It was helpful!
posted by Nelson at 6:54 PM on March 11, 2016 [1 favorite]


Now, does it look blue to you, or white?

Gold!
posted by Night_owl at 8:17 PM on March 11, 2016 [3 favorites]


This is a great idea! Thank you for making it.

I was in the mood to program, so I wrote a version that assigns each user a random color and a symbol, and sets the background color to black or white so it's readable. Here's a screenshot, the GitHub repo, and the install link.

It doesn't use jQuery or the Greasemonkey API, just the DOM (since that's what I know). Turns out it performs well: on the 2,113-comment emotional labor thread, it adds less than a second of runtime.

I've only tested this on Firefox 45, so it may need some fine-tuning. It's MIT licensed, so feel free to make any changed y'all want—change the available symbols, limit the colors, give everyone their own font, fix any bugs, whatever.
posted by Rangi at 9:28 PM on March 11, 2016 [3 favorites]


See? Trivia brings about great things.
posted by corb at 9:49 PM on March 11, 2016 [1 favorite]


Nice, Rangi. Seems useful for more easily seeing commenter trends and keeping track of conversations in a long thread.

I think I figured out where my performance problems come from, but unfortunately the source is the color picker plugin I chose that adds a palette DOM element for every comment. So I'm trying to figure out if it's easier to change that and find new hosting for the plugin (can I use GH Pages?) or just find a different plugin.
posted by valrus at 9:22 AM on March 12, 2016


Very neat! I think a way you can save a lot of memory is to just have one picker DOM element that has a style such that it always appears above the other elements when it does show. (I think "position: fixed" may do it?).

Then, you can add `a` elements to each `.comments .smallcopy` element, along with click event handlers on each of those `a` elements to show the hidden picker.
posted by ignignokt at 11:08 AM on March 12, 2016


I've wanted to do something similar, but haven't implemented:

  • Give each user a generated identicon that will uniquely identify them.
  • Move the "posted by XXX" to the top of the comment so you know who wrote the comment without having to scan to the bottom of it and then returning to the top of the comment to read it.

  • Perhaps something to talk about at the next Seattle pub trivia night.
    posted by ShooBoo at 12:59 PM on March 12, 2016 [1 favorite]


    Metafilter: a number of people who give great answers and advice over in ask but are complete knobs when commenting on fpps.
    posted by Segundus at 2:14 PM on March 12, 2016 [2 favorites]


    ignignokt, yeah, that's the approach I'm trying to take. The annoying thing is it means I basically have to reimplement the plugin's show/hide functionality, which is the kind of thing I hate to do.
    posted by valrus at 3:07 PM on March 12, 2016


    Reminds me of the April Fool surprise committed by pb and matthowie one year: all print rainbowed through many colors. Fun, but of course some people complained when the lighter colors became quite hard to read.
    posted by Cranberry at 1:12 PM on March 13, 2016 [2 favorites]


    Reminds me of the April Fool surprise committed by pb and matthowie one year: all print rainbowed through many colors.

    Oooh. I miss that. Is that a thing that Greasemonkey could bring back? It was so pretty! And easy to make legible again when it got too out of hand by refreshing the page - clicking on a timestamp near where I was reading.
    posted by tomboko at 5:43 PM on March 13, 2016


    OK, after finding a smaller color picker plugin and spending a frankly ridiculous amount of time overhauling it to fix the overeager DOM manipulation of the first version, I have a new version with much improved performance. The original will still be at this link: https://github.com/valrus/mefi-comment-colors/raw/v0.1/mefi-comment-colors.user.js

    The new version uses a tiny little color picker that just (as of now) offers 12 colors to choose from rather than the whole spectrum. This is a side effect of switching plugins (in addition to the performance improvements, the new one is also a LOT smaller) but I think it's a better user experience as well; it's easier to use the same color to indicate users in a "group" if you don't have 65,000 to choose from.

    I hope to choose a better set of colors than the defaults and address some of the other outstanding issues later this week!
    posted by valrus at 9:25 PM on March 13, 2016 [1 favorite]


    Valrus, does it only work on metafilter.com? Because I'm not able to see the little boxes on
    ask.metafilter and metatalk, so I can't change the comment colors for users on the subsites.
    posted by Lynsey at 10:21 PM on March 13, 2016


    Lynsey, currently yes, but you can change it in the Greasemonkey options. If you have the monkey menu in your toolbar, go to "Manage User Scripts" and open the options for this script. Add
    *://*.metafilter.com/*
    in "Included Pages" under the "User Settings" tab. That will be one of the changes I plan to make this week and it should be quick but I haven't gotten to it yet.
    posted by valrus at 8:27 AM on March 14, 2016


    <input type="color">, which gives an OS-native color picker, is supported by Chrome and Firefox. The Spectrum library you were using before can be configured to overload such inputs for IE and Safari, although I'd be surprised if there's any demand for that since those browsers don't support Greasemonkey scripts anyway (at least not without some hacky plugins). The MetaFilter User Tagger script uses it and nobody has complained about IE/Safari.
    posted by Rangi at 8:37 AM on March 14, 2016 [1 favorite]


    Mod note: Removed a pile of outdated code from one of Rangi's comments by their request.
    posted by cortex (staff) at 8:53 AM on March 14, 2016


    Move the "posted by XXX" to the top of the comment so you know who wrote the comment without having to scan to the bottom of it and then returning to the top of the comment to read it.

    I agree with this impulse but only because I'm a terrible person: sometimes I'll come across a long comment and I'll begin reading it and start disagreeing with it in my head and by ¶ 3 I'm filled with rage and can't even finish it and scroll down to see who posted it and my eyes narrow in heinous recognition and I go 'OF COURSE THEY WROTE THIS PILE OF FESTERING SEAGULL FECES I HOPE THEIR EYES MELT OUT OF THEIR FACES WHY DID I BOTHER BEGINNING TO READ THIS' so really from a safe remove I think it's valuable to site culture that comments are allowed to speak for themselves to some degree rather than being immediately attributed to someone which may or may not color your reading of that comment prior to engaging with it.
    posted by beerperson at 8:59 AM on March 14, 2016 [2 favorites]


    My awful memory does a fun/weird thing where I am generally only able to place usernames in one big bucket of "MeFites Whose Names I Recognize" instead of two buckets of "Great MeFites Whose Names I Recognize" and "Terrible MeFites Whose Names I Recognize". I honestly think this helps me have a more stress-free and enjoyable MetaFilter experience, and if I were to use a script like this I genuinely think I would have to disable it very quickly.
    posted by Rock Steady at 11:50 AM on March 14, 2016 [1 favorite]


    Yes, in my personal playing around with this script I've come up with some more positive use cases:
    • MeFites I've met IRL (I want to make sure their comments stick out in case any of them present conversational opportunities the next time I see them!)
    • Mods (there's a MeTa related to this going on right now!)
    • MeFites whose posts I tend to like and want to make sure I don't miss
    • Some less-obtrusive color for myself, per beerperson's comment
    posted by valrus at 2:00 PM on March 14, 2016 [2 favorites]


    What I would like to see is a script that increases a user's comments by one font size each time they comment in a thread.
    posted by terrapin at 3:14 PM on March 14, 2016 [1 favorite]


    « Older Should Debates (and other unique events) be...   |   An AskMe comment gets a mention in The Guardian Newer »

    You are not logged in, either login or create an account to post comments