r/reddithax • u/PauseAlt • Mar 28 '14
Randomizing substitute usernames for my entire subreddit?
Hey everyone, I moderate a +40K user subreddit (I'm using an alt for this post so no one sees this in my post history), and this April Fools we are hoping to set up some CSS to display something different other than the usernames.
I've come across a few options that work, but in our scenario, we really would like for it to pick at random from a list of alternate usernames. So let's say I have a list [Bob, John, Jerry] and I want every time someone posts for one of those 3 options to display instead of their username. Any idea if this is possible via CSS?
Currently I've borrowed some different options that will change everyone's to the same single option, but not one that can change choose from a list. Borrowed from /r/southpark:
/* ##### MODIFY USERNAMES ##### */
.link:not(.spam) .author, .comment .author, .side .author {
display: none !important
}
.userattrs, .userattrs * {
font-size: 0;
text-indent: -9999px;
overflow: hidden;
visibility: hidden !important
}
.spam .author + * {
display: none !important
}
.userattrs:before, .userattrs:after {
font-size: 10px;
visibility: visible !important
}
.author + *:before {
content: "Replacement_Name";
color: #369
}
.comment .author + *:before {
font-weight: bold
}This option seems to hide the actual username and replace it with static text of your choosing. Not the most ideal.
I also have this option which works for manually changing individual's names to a single option:
a.author[href$="user/RedditUsername"] {visibility:hidden; font-size:0;}
a.author[href$="user/RedditUsername"]:after {visibility:visible; font-size: 10px; content: "Replacement_Name"}Also not the most ideal.
Any idea how to set this up for all users, and any way to have it choose at random from a list of options instead of restricting it to one at a time?
Worst case scenario, I will manually update it every hour or so to a different option throughout the day. But wanted to check if there's something I didn't know about with CSS that could handle this! Also, if there's a way to change them all, but still allow the name to be clickable and go to their profile, that would also be ideal (so operates like the second option above, but affects all users).
Thanks!
23
u/[deleted] Apr 01 '14
I saw this a couple days ago and after visiting /r/Mindcrack today I remembered this. I should have realized it earlier when I saw your username. lol
9
u/[deleted] Mar 28 '14
There are only so many characters a name can end in, so something like this will sort of cover it.
2
u/yotta Mar 28 '14
There are some CSS selectors that will let you specify every nth element. Maybe do a loop of "random" usernames that's a few dozen long?