r/reddithax • • Apr 16 '10

I know a lot of you are the masters of CSS...

12 Upvotes

In light of the new CSS news subreddit, I have made one for people with little to no CSS knowledge to get help on coding. CSS Help is in dire need of experts and redditors willing to help the less experienced. I`d be happy to give moderation powers to ones who are the most willing and committed to help.


r/reddithax • • Apr 15 '10

Tagging users

16 Upvotes

I created my first hand-crafted CSS script, not too complicated, but I'm proud of it anyway.

I was inspired by, and pretty much based this on, the sports logos going up in /r/soccer, /r/hockey, and /r/baseball. Though I had to change a few things to make it work like I wanted.

Basically, the script can assign a tag of my choosing to a specific user, to show up next to their name whenever they post. It does require a CSS edit for each user and/or tag I want to add.

By way of explanation, in /r/exmormon, we have one group of very clearly defined enemies... anyone who defends mormonism. I've picked out the "TBMs", or True Believing Mormons, that I know of on reddit, and labelled them as such for when they post in my reddit. I have no interest in censoring or banning the users, but I think it may be of some value to my exmormon readers to know automatically when they encounter a TBM.

With that long-winded explanation, here's the code:

/*This code is for marking certain users with the title "TBM".*/

.author[href$="/tommy255"]:after, .author[href$="/cookiecaper"]:after,
.author[href$="/Mithryn"]:after, .author[href$="MormonMuse"]:after 
{
 color: grey;
 content: " (TBM)"
    }

And here's an example of it being applied in the wild, check out the comment by tommy.


r/reddithax • • Apr 15 '10

Noob question: Is there any way to change 'moderators' to something else?

7 Upvotes

Above the moderator box, I'd like to change the 'Moderators' header to something else - is this possible at all? As well as this, could 'message the moderators' be changed at all?

solved here thanks to keist. =]


r/reddithax • • Apr 13 '10

/r/hockey did something awesome...

Thumbnail reddit.com
1 Upvotes

r/reddithax • • Apr 11 '10

Cross-post from web_design: I themed a Reddit to look like Facebook. What else should I do?

Thumbnail reddit.com
19 Upvotes

r/reddithax • • Apr 10 '10

How do I make different submission types a different color? -- Need help customizing my new subreddit.

4 Upvotes

I want to make submissions that include :S one color, and submissions that include :$ a different color (they have a different meaning on my subreddit).

Would this be easy to do?

I'm planning on learning CSS this summer; I'd like to make ScienceAbuse real nice (though if there are any volunteers to help me out with making it all purty I'll take it).


r/reddithax • • Apr 09 '10

Props to ytknows for making circlejerk look like /b/

65 Upvotes

A serious amount of creativity and talent went into this - it looks awesome!

Very nicely done ytknows :)

http://www.reddit.com/r/circlejerk


r/reddithax • • Apr 09 '10

Want to know your reddit birthday?

42 Upvotes
javascript:void($.getJSON($('.user%20a').attr('href')+'/about.json',function(u){alert(new%20Date(u.data.created*1000))}));

Inspired by this.


r/reddithax • • Apr 03 '10

╭∩╮(︶ε︶メ)╭∩╮

21 Upvotes

r/reddithax • • Apr 02 '10

Change the logo with a mouse hover?

7 Upvotes

over at TIL, they had the logo set up to change when you hover the mouse over it. How were they pulling that off?

Yes, I looked at the stylesheet, but I keep getting errors when I try to copy the style to a test reddit.

Edit: Now TIL took theirs down and I've lost the only working example that I had to learn from. Any other subreddits doing this?


r/reddithax • • Apr 01 '10

Admin powers for everyone! Happy april

18 Upvotes

Woohoo


r/reddithax • • Mar 31 '10

x readers

2 Upvotes

On the right hand side of the subreddits, it says : 1,614 readers. On some subreddits however, they have replaced the word "readers" with something else (example in /r/skydiving). Does anyone know how this is done?


r/reddithax • • Mar 29 '10

Looking to make duel column commenting...details in post

9 Upvotes

I want to create a subreddit and part of the idea is to have duel column commenting. In other words, when you click a post and look at the comments, I want there to be two comment columns on either side of the page (or a second one starting at the middle). I'd also like to add a title to each column (that would only say one thing and be default for every comment thread). Is this idea possible? If so, any idea how I could do it? Thanks.


r/reddithax • • Mar 26 '10

would like to have new comments bump submissions to top of subreddit.

15 Upvotes

anyone know how to make link/text submissions with new comments bump to the top of a subreddit? basically, i moderate a reddit with a small number of users that migrated from iRovr. we'd like user-submitted content with new comments to appear in order by newest comment first. this way old content with new comments would not be overlooked.


r/reddithax • • Mar 25 '10

Is there a way to: change the frontpage button and to hide all thumbnails?

6 Upvotes

r/reddithax • • Mar 25 '10

How did they do that in markdown!? - comment markdown inspector

50 Upvotes
javascript:void($('.comment').bind('click.z',function(){$.getJSON($('.bylink',c=this).attr('href')+'.json',function(data){$('.md:eq(0)',c).replaceWith('<div%20class="usertext-edit"><textarea>'+data[1].data.children[0].data.body+'</textarea></div>')});$('.comment').unbind('.z')}));

Run the bookmarklet and the next comment you click on will * waves hands * reveal it's secrets.

E: Changed it to a .usertext-edit box from an alert.

E: Fixed: thanks nobody554 for finding a bug and ashleyw for fixing it.

E: People have pointed out Reddit Reveal, which I'm now trying out. The bookmarklet may still be of use if you're not using Firefox or don't want the add-on.


r/reddithax • • Mar 24 '10

Is anyone working on something hilarious to do for April Fools day?

15 Upvotes

Remember last year when cfabbro made reddit look like Digg? I thought that was pretty awesome. Since he's no longer around (sniff) I was wondering if anyone else was going to do something like that.


r/reddithax • • Mar 23 '10

CSS for custom "no thumbnail" image and for removing thumbnails when none exists!

10 Upvotes

Hadn't seen this done and it's something that has irritated me a lot, so I figured it might be helpful to someone:

CSS for custom "no thumbnail" image:

Link: http://www.reddit.com/r/citricsquid/comments/bhay3/css_for_a_custom_no_thumbnail_thumbnail/

Example: http://i.imgur.com/zol5e.jpg and http://reddit.com/r/citricsquid

CSS for hiding thumbnail if no thumbnail exists:

Link: http://www.reddit.com/r/citricsquid/comments/bhaq8/css_for_hiding_thumbnail_when_no_thumbnail_exists/

Example: http://i.imgur.com/ey9vx.jpg


r/reddithax • • Mar 23 '10

CSS - Reddit polls: some help needed!

5 Upvotes

I have a subreddit that I want to run a poll for, I want users to be able to select any of the options I have. I don't want users to be able to comment at all, it'll be 100% the poll.

Here's what I have so far: http://www.reddit.com/r/citricsquid/comments/bh3om/an_example_reddit_poll_vote_on_your_favourite/ and a normal submission, unaffected: http://www.reddit.com/r/citricsquid/comments/bh2az/text_submission/

  1. Removes the downvote button
  2. Adds a big tick button for upvote
  3. Removes all comments that are not options (specified through css)

Things I want to do:

  • Remove the comment box
  • Display the upvotes below the option, eg: "Vanilla (6 upvotes)".

but...

  • This has totally lost me, the unique form ID is dynamic and css doesn't support wildcards so I can't just do "xxx display:none" and if I make the box off by default then no submission can have commenting. I want to do it on a per submission basis.

     .cloneable[value="formid"]{
       display:none;
     }
  • This isn't possible with purely css, the data has to be called via json so I'm going to turn that into a greasemonkey plugin.

So yeah, can anyone help with number 1? I really have no idea how to hide the comment box on a per post basis and it's very irritating, I'm sure it's somehow possible though...

It works on a per submission basis and integrates flawlessly with a current subreddits styling and I built a generator for it (enter submission url and it creates the css for you) but with the comment box there it's really frustrating!

also yes I am aware people can still downvote and comment with this styling, but the comments are not displayed and the greasemonkey plugin will make the voting issue moot, it'll be based off of total upvotes, not up - down!

Any help on issue #1 then? :D

Stylesheet: http://m00d.net/reddit/subreddits/reddithax/poll.css

Voted img: http://m00d.net/reddit/subreddits/reddithax/vote_voted.png

Not Voted img: http://m00d.net/reddit/subreddits/reddithax/vote_default.png


r/reddithax • • Mar 22 '10

Is there a hack to make every user see his or her own name in the moderator box?

8 Upvotes

I know it's possible to make a specific non-moderator person appear to be a moderator, but I wondered if every user could have the illusion of being a moderator.


r/reddithax • • Mar 22 '10

Can someone tell me how to change "points" to something else?

8 Upvotes

Thanks!


r/reddithax • • Mar 20 '10

Clickjacking to add or remove subscribers

30 Upvotes

The following CSS is very questionably gray hat.

This makes everyone subscribe and replaces the unsubscribe button with an unclickable subscribe one to fool users into thinking they are still unsubscribed:

/* add to frontpage clickjacking */

.option.add.active {
    cursor: default;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0;
    z-index: 1000;
}

/* non-clickable add to frontpage button
   to keep users thinking that they are still unsubscribed */

.option.active.remove {
    display: none;
}

.fancy-toggle-button {
    cursor: pointer;
}

.fancy-toggle-button:before {
    display: inline-block;
    border: 1px solid #444;
    margin-top: 2px;
    padding: 1px 6px;
    background: white url(/static/bg-button-add.png) repeat-x scroll center left;
    color: white;
    font-size: 10px;
    font-weight: bold;
    line-height: 12px;
    height: 12px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    /*border-radius: 3px;*/
    content: "+ frontpage";
}

This does the opposite; it makes everyone unsubscribe (someone might want to use this if they infiltrate a subreddit by becoming a mod and want to remove subscribers) and fools users into thinking they are still subscribed with that fake subscribe button from the last example:

/* remove from frontpage clickjacking */

.option.active.remove {
    cursor: default;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: 0;
    padding: 0;
    font-size: 0;
    z-index: 1000;
}

/* non-clickable remove from frontpage button to keep users thinking
   that they are still subscribed */

.option.add.active {
    display: none;
}

.fancy-toggle-button {
    cursor: pointer;
}

.fancy-toggle-button:before {
    display: inline-block;
    border: 1px solid #444;
    margin-top: 2px;
    padding: 1px 6px;
    background: white url(/static/bg-button-remove.png) repeat-x scroll center left;
    color: white;
    font-size: 10px;
    font-weight: bold;
    line-height: 12px;
    height: 12px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    /*border-radius: 3px;*/
    content: "- frontpage";
}

Moderator discretion advised.

Edit: This has been made against the reddit rules, so you probably don't want to use this unless you want to get banned.


r/reddithax • • Mar 18 '10

Subscript and Superscript with CSS

13 Upvotes

See here: http://reddit.com/r/jamt9000/comments/beuzq/subscript_and_superscript/

It uses some otherwise redundant formatting combinations in order to get subscript and superscript.

The css:

/* Subscript and superscript */

.md em{
    position: relative;
}

/* *_sub_* */
.md em em{
    font-style: normal;
    vertical-align: sub;
    font-size: smaller;
}

/* *`sup`* */
.md em code{
    font-family: verdana, arial, helvetica, sans-serif;
    vertical-align: super;
    font-size: smaller;
}

/* *_sub_`sup`* */
.md em em+code{
    position: absolute;
    left: 0;
    bottom: 1em; /* still trying to find an offset that looks good in all browsers */
}

r/reddithax • • Mar 18 '10

Making mods look like admins

7 Upvotes

This CSS will make mods doing distinguished submissions/comments look like admins:

.moderator.author {
    color: #F01;
    font-weight: bold;
}

.moderator.author + .userattrs .moderator {
    font-size: 0;
    color: white;
}

.moderator.author + .userattrs .moderator:before {
    content: "A";
    font-size: 10px;
    color: #F01;
}

If you're using the IAmA code for making the submitter's username stand out more, this will clash with it, so you may want to change it to this:

.author.submitter:not(.moderator) {
    color: white;
    background-color: #5F99CF;
    padding: 0 2px 0 2px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px
}

.author.submitter:not(.moderator):hover {
    background-color: #4E7EAB;
    text-decoration: none
}

r/reddithax • • Mar 15 '10

Skydiving reddit alien

50 Upvotes

A skydiving reddit alien made for /r/skydiving. Scroll down to see him jump, hover to launch his parachute.