Skip to content

Instantly share code, notes, and snippets.

@go1dfish
Created May 27, 2015 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save go1dfish/4616ffa11da05bf37e92 to your computer and use it in GitHub Desktop.
Save go1dfish/4616ffa11da05bf37e92 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Reddit remover
// @namespace http://userstyles.org
// @description Removes some elements from reddit pages
// @author userstylishone
// @homepage https://userstyles.org/styles/114307
// @run-at document-start
// @version 0.20150526083346
// ==/UserScript==
(function() {var css = "";
css += [
"/* ",
"",
"!!! IMPORTANT !!!",
"",
"Be sure to DISABLE subreddit styles. ",
"https://www.reddit.com/prefs/ -> Display Options -> []allow subreddits to show me custom themes",
"",
"There are CSS watermarks in some subreddit styles. ",
"",
"Make sure this style is activated. ",
"",
"!!! IMPORTANT !!!",
"",
"Highly suggested: Disable Reddit Enhancement Suite in addition.",
"",
"It is up to you to verify and crop screenshot afterwards. CSS elements are subject to change. ",
"Rare, Moderator, & Gold elements may be missed.",
"",
"Firefox has built in screenshotting: ",
"",
"firefox instructions; shift-f2 , screenshot --clipboard --fullpage ",
"",
"Chrome you\'ll have to find an add on that lets you do full page or selected parts of the page.",
"",
"*/",
"",
"@namespace url(http://www.w3.org/1999/xhtml);"
].join("\n");
if (false || (document.domain == "reddit.com" || document.domain.substring(document.domain.indexOf(".reddit.com") + 1) == "reddit.com"))
css += [
"/* Removes (edit) and other stuff below a comment */ ",
".flat-list {",
" visibility: hidden !important;",
"}",
"",
"/* Removes time related info */ ",
".live-timestamp {",
" visibility: hidden !important;",
"}",
"",
"/* Removes that you voted on an item */ ",
".score {",
" visibility: hidden !important;",
"}",
"",
".comment.noncollapsed .midcol {",
" visibility: hidden !important",
"}",
" ",
".midcol {",
" visibility: hidden !important",
"}",
"",
"/* Removes tags you\'ve given somebody */ ",
".RESUserTag {",
" visibility: hidden !important;",
"}",
" ",
".userattrs {",
" visibility: hidden !important;",
"}",
"",
".user {",
" visibility: hidden !important;",
"}",
"",
"/* Removes the reply area */ ",
".commentingAs {",
" visibility: hidden !important;",
"}",
"",
".panestack-title {",
" visibility: hidden !important;",
"}",
"",
".menuarea {",
" visibility: hidden;",
"}",
"",
".usertext-edit {",
" visibility: hidden !important;",
"}",
"",
"",
"/* Some variations of the above, fixing rarer stuff like friends, more checks to make it secure */",
"",
".approval-checkmark {",
" visibility: hidden !important;",
"}",
"",
"#viewImagesButton {",
" visibility: hidden;",
"}",
"",
".thing .tagline .author.friend {",
" color: #369!important;",
" font-weight: normal!important;",
" padding: 0 0 0 0!important;",
" border-radius: 0px!important;",
" background-color: rgba(0, 0, 0, 0)!important;",
"}",
"",
"span.userattrs.tb-history {",
" display:none!important;",
"}",
"",
".comment .tagline .author.friend {",
" font-weight:bold!important;",
" padding: 0 0 0 0!important;",
"}",
"",
".thing .tagline .author.submitter {",
" color: #FFFFFF !important;",
" font-weight: bold!important;",
" padding: 0 2px 0 2px!important;",
" border-radius: 3px!important;",
" background-color: #0055DF!important;",
"}",
"",
".res .comment span:nth-child(3) {",
" display:none!important;",
"}",
"",
".res .comment span:nth-child(6) {",
" display:none!important;",
"}",
"",
".res .comment span:nth-child(7) {",
" display:none!important;",
"}",
"",
".res .comment span:nth-child(8) {",
" display:none!important;",
"}",
"",
".linkinfo .totalvotes {visibility:hidden;}",
"",
"#header-bottom-right {display:none;}",
"",
".side {visibility:hidden;} ",
"",
".shortlink { visibility:visible;} ",
"",
".titlebox h1 a { visibility:visible;}",
"",
".side .md { visibility:visible;}",
"",
".titlebox .bottom{visibility:visible;}",
"",
".titlebox .age {visibility:hidden!important;}",
"",
"time, #sr-header-area, .footer-parent, #tb-bottombar {",
"display:none;",
"}",
"",
"#header-bottom-left{",
" padding-top:19px;",
"}",
"",
".gold-accent.comment-visits-box {visibility:hidden;}",
"",
".flair {display:none;}",
"",
".res .comment span:nth-child(8), .res .comments-page .linklisting .tagline span:nth-child(6), .res .comments-page .linklisting .tagline span:nth-child(7) {",
" display:none!important;",
"}",
"",
"/* Finally the advertisement so people know where to find this */",
".content:after {",
" position:absolute;",
" font-size:14px;",
" color:black;",
" content: \"https://userstyles.org/styles/114307/reddit-remover\";",
" top: 0px; ",
" z-index:99;",
"}"
].join("\n");
if (typeof GM_addStyle != "undefined") {
GM_addStyle(css);
} else if (typeof PRO_addStyle != "undefined") {
PRO_addStyle(css);
} else if (typeof addStyle != "undefined") {
addStyle(css);
} else {
var node = document.createElement("style");
node.type = "text/css";
node.appendChild(document.createTextNode(css));
var heads = document.getElementsByTagName("head");
if (heads.length > 0) {
heads[0].appendChild(node);
} else {
// no head yet, stick it whereever
document.documentElement.appendChild(node);
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment