sanereddit

Sanereddit will remove tons of bloat, allowing reddit to be used in a sane manner.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name		sanereddit
// @namespace		sanereddit
// @version		1.6
// @grant		none
// @include		http*://*.reddit.com/*
// @license MIT
// @description	Sanereddit will remove tons of bloat, allowing reddit to be used in a sane manner.
// ==/UserScript==
(function() {
	function getScrollbarWidth() {
		var outer = document.createElement("div");
		outer.style.visibility = "hidden";
		outer.style.width = "100px";
		outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
		document.body.appendChild(outer);
		var widthNoScroll = outer.offsetWidth;
		// force scrollbars
		outer.style.overflow = "scroll";
		// add innerdiv
		var inner = document.createElement("div");
		inner.style.width = "100%";
		outer.appendChild(inner);
		var widthWithScroll = inner.offsetWidth;
		// remove divs
		outer.parentNode.removeChild(outer);
		return widthNoScroll - widthWithScroll;
	}
	$(function() {
		var sbWidth = getScrollbarWidth();
		var sideBar = document.getElementsByClassName('side') [0];
		var linkList = document.getElementsByClassName('linklisting') [0];
		var commentarea = document.getElementsByClassName('commentarea')[0];
		var comments = document.getElementsByClassName('comment');
		var mds = document.getElementsByClassName('md');
		var root= document.compatMode=='BackCompat'? document.body : document.documentElement;
		function go() {
			$("a.title").css('fontSize','small');
			$("div.thing").css('marginBottom', '0px');
			$("div.footer-parent").hide();
			$("div.content").css("marginTop","0px");
			sideBar.style.display = 'none';
			linkList.style.width = (root.clientWidth - sbWidth) + 'px';
			if (commentarea !== undefined){
				commentarea.style.width= (root.clientWidth - sbWidth) + 'px';//'100%';
			}
			var i = 0;
			for (i = 0; i < comments.length; i++) {
				comments[i].style.width = '100%';
			}
			for (i = 0; i < mds.length; i++) {
				var elem = mds[i];
				var marginRight = 0;
				var depth = $(elem).parentsUntil("div.commentarea").filter('div.thing').length;
				elem.parentElement.style.width = (root.clientWidth - sbWidth - (depth * 31)) + 'px';
				elem.style.maxWidth = '100%';
			}
		}
		// Attach it the resize event
		window.addEventListener('resize', function (event) {
			go();
		});
		// Run it once initially
		go();
	});
})();