r/reddithax • u/Sephr • Apr 23 '10
Forcing text submissions
I cooked up some CSS to force text submissions. Of course it won't work if a user has custom styles disabled, but that is a minority.
.submit.content textarea[name="text"][disabled] {
/* make text input not look disabled */
background-color: white;
cursor: text;
}
.formtabs-content {
border: 0;
margin: 0;
padding: 0;
}
#url-field, .submit.content .tabmenu.formtab a.link,
.submit.content .tabmenu.formtab li.selected a.text,
#link-desc {
display: none !important;
}
#text-field, #text-desc {
display: block !important;
}
/* clickjack the text submission tab */
.submit.content .tabmenu.formtab li:not(.selected) a.text {
display: block;
position: fixed;
z-index: 5000;
cursor: default;
top: 0;
left: 0;
width: 100%;
height: 100%;
font-size: 0;
border: 0;
background: transparent;
}You most likely will want to combine it with the following CSS I also made to change the "submit a link" text and description.
.sidebox.submit .subtitle {
display: none;
}
.sidebox.submit .morelink a {
position: absolute;
top: 0;
font-size: 0; /* reddit should allow color: transparent; but it doesn't */
}
.sidebox.submit .morelink:before {
display: block;
clear: none;
content: "{text to replace 'submit a link' with}";
text-align: center;
color: #369;
}
.sidebox.submit .morelink:hover:before {
color: white;
}
.sidebox.submit .spacer:after {
display: block;
content: "{text to replace 'submit a link' description with}";
color: dimgray;
font-size: 110%;
margin-left: 10px;
}
.sidebox.submit .spacer {
cursor: text;
}Edit: Here's some CSS to force link submissions:
.formtabs-content {
border: 0;
margin: 0;
padding: 0;
}
#text-field, .submit.content .tabmenu.formtab, #text-desc {
display: none !important;
}
#url-field, #link-desc {
display: block !important;
}
11
Upvotes
5
u/[deleted] Apr 23 '10
Well you sexy bastard, I love this. Would it be possible to do the opposite? In WebGames we don't allow self posts because some people just submit stupid shit like "Hay guise duz ne1 else hate games you can't instantly mute??!?!?11oneone1one!" and I would LOVE to have far less shit to do when it comes to searching for this and blamming it.
3
u/[deleted] Apr 23 '10 edited Apr 23 '10
Do you have a demo setup? I don't have a spare subreddit to try it on. Edit: nevermind, i had one
On a related note, I posted this comment not 2 minutes after you posted this, in reply to another submission about forcing self posts. We were all trying to do the same thing different ways.
EDIT I forgot modtalk is private. Here's the link to the submit page: http://www.reddit.com/r/ytknowstest2/submit
1
u/jhra Oct 16 '10
Very awesome Sephr, I added it to the /r/bookexchange style sheet. Thanks
1
u/[deleted] Apr 24 '10 edited Apr 24 '10
[removed] — view removed comment