Reddit Animated Sidebar

Best side bar cover up.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name          Reddit Animated Sidebar
// @namespace     http://userstyles.org
// @description	  Best side bar cover up.
// @author        anonnow
// @homepage      https://userstyles.org/styles/109720
// @include       http://reddit.com/*
// @include       https://reddit.com/*
// @include       http://*.reddit.com/*
// @include       https://*.reddit.com/*
// @run-at        document-start
// @version       0.20150125230053
// ==/UserScript==
(function() {var css = [
	"@namespace url(http://www.w3.org/1999/xhtml);",
	"html {",
	"    overflow-x: hidden;",
	"}",
	"",
	".side {",
	"    margin-left: 0px;",
	"    margin-right: -280px;",
	"    opacity: 0.6;",
	"    transition: opacity 0.5s, margin 0.5s;",
	"    -webkit-transition: opacity 0.5s, margin 0.5s;",
	"    -moz-transition: opacity 0.5s, margin 0.5s;",
	"    -o-transition: opacity 0.5s, margin 0.5s;",
	"    transition-delay: 1s;",
	"    -webkit-transition-delay: 1s;",
	"    -moz-transition-delay: 1s;",
	"    -o-transition-delay: 1s;",
	"    transition-timing-function: ease-in-out;",
	"    -webkit-transition-timing-function: ease-in-out;",
	"    -moz-transition-timing-function: ease-in-out;",
	"    -o-transition-timing-function: ease-in-out;",
	"}",
	"",
	"body>.content, body {",
	"    /* This MUST apply to prevent showing stuff through the side bar */",
	"    z-index: -1 ;",
	"    position: relative ;",
	"}",
	"",
	".side:hover, .side:focus {",
	"    transition: opacity 0.2s, margin 0.2s;",
	"    -webkit-transition: opacity 0.2s, margin 0.2s;",
	"    -moz-transition: opacity 0.2s, margin 0.2s;",
	"    -o-transition: opacity 0.2s, margin 0.2s;",
	"    /* Apply a negative margin to the left to prevent the content from",
	"       being shuffled around by the side bar */",
	"    margin-left: -280px;",
	"    margin-right: 0px;",
	"    opacity: 1;",
	"    transition-delay: 0s;",
	"    -webkit-transition-delay: 0s;",
	"    -moz-transition-delay: 0s;",
	"    -o-transition-delay: 0s;",
	"}",
	"",
	".content {",
	"    margin-right: 40px ;",
	"}"
].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);
	}
}
})();