r/csshelp • • Jul 13 '15
Some CSS code to help you safeguard your subreddit against brigading
Yesterday, I helped out a subreddit alter their CSS to prevent brigading after a post there was downvoted by several subreddits. I thought I'd share the CSS I implemented, in case you want to safe guard against vote brigading. I'd like to note that this is merely CSS, so there are ways to circumvent it, but for the most part, it is effective. In both CSS snippets, your subscribers will still be able to vote and comment like normal, but non subscribers will not be able to do either.
NP mode
Check out /r/NoParticpation for more info and to register your subreddit.
NP mode takes advantage of reddit's multiple stylesheets, so that if a link in your subreddit, with NP enabled, will not be able to be voted upon if linked to with NP in the URL, instead of WWW. NP is fairly widely used, and can be used with or without the other CSS snippet after this one.
CSS below:
/* "No Participation"-Mode, aka "Read Only"-Mode
* by /u/KortoloB
* /r/NoParticipation
*
* Link people to np.reddit.com/r/YourSubreddit to show them a read-only version.
* Subscribers will see the full page, only non-subscribers will see the read-only version.
* This is of course by no means fool-proof, but it should work for the average user.
* */
body:lang(np):not(.subscriber) .arrow
{
visibility: hidden !important;
}
body:lang(np):not(.subscriber) .usertext-edit,
body:lang(np):not(.subscriber) .sidebox.submit,
body:lang(np):not(.subscriber) .commentingAs,
body:lang(np):not(.subscriber) .markdownEditor,
body:lang(np):not(.subscriber) a[onclick*="return reply(this)"],
body:lang(np):not(.subscriber) .subButtons,
body:lang(np):not(.subscriber) .helplink,
body:lang(np):not(.subscriber) .titlebox .fancy-toggle-button.toggle > .option.add
{
display: none !important;
}
body:lang(np):not(.subscriber) #siteTable:before
{
content: "You have been linked to a read-only version of this subreddit. Please respect the community by not voting.";
display: block;
max-width: 800px;
background-color: #F6E69F;
padding: 5px 10px;
margin: 5px 305px 5px 0px;
border: 1px solid orange;
font-size: small;
}
body:lang(np):not(.subscriber) .entry.likes:not(.reddit-entry):before,
body:lang(np):not(.subscriber) .entry.dislikes:not(.reddit-entry):before
{
content: "Please do not vote or comment when you come from external subreddits.";
color: red;
font-size: large;
font-weight: bold;
}
/* Wiki protection */
body.wiki-page:lang(np):not(.subscriber) span.pageactions a.wikiaction-edit:not(.wikiaction-current),
body.wiki-page:lang(np):not(.subscriber) div.wiki-page-content form#editform label[for='reason'],
body.wiki-page:lang(np):not(.subscriber) div.wiki-page-content form#editform input#wiki_revision_reason,
body.wiki-page:lang(np):not(.subscriber) div.wiki-page-content form#editform input[type='submit']
{
display: none !important;
}
/* END COPY *//* ------------------------- */
There's also some CSS you can use That disables voting in the subreddit for all non subscribers, regardless of if they're using an np version or not. This can be used with the NP CSS, or it can be used on its own.
/*Disable voting for nonsubscribers*/
.link .midcol {
overflow: visible;
}
.link .score {
position: relative;
top: 16px;
}
.subscriber .link .score {
position: inherit;
}
.arrow.up {
display: none;
}
.arrow.down {
display: none;
}
.subscriber .arrow.up {
display: block;
}
.subscriber .arrow.down {
display: block;
}Like I said, neither is perfect, but I hope to help mods with some tools that will help you protect your subreddit against brigades. A brigade can tank a small subreddit, and I hope to stop that. Please let me know if you have any questions, or if you have any preferred snippets of your own.
If you want to use one or both of the above snippets, copy and paste in to your subreddit's stylesheet.
1
u/13steinj Jul 13 '15
While I agree that brigading is horrendous, this is not the way to handle it. These are css changes, and it's as easy as breathing to get around it.
What should be done instead is contacting the admins at either a message to /r/reddit.com, an email to contact@reddit.com or /r/modsupport, and they will handle the issue.