您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Hide the right sidebar in reddit.com, adds a tiny button to click to get it back.
当前为
// ==UserScript== // @name Reddit Side Bar Hider // @namespace http://tampermonkey.net/ // @version 0.1 // @description Hide the right sidebar in reddit.com, adds a tiny button to click to get it back. // @author Zak M-O // @match http*://www.reddit.com/* // @grant none // ==/UserScript== (function() { 'use strict'; var el = document.createElement("div"); var header = document.getElementById("header"); el['style'] = "width:10px; height:10px; float:right; border: thin solid orange;" +"color: light-blue; cursor: pointer; user-select: none; -webkit-user-select: none;" +"-moz-user-select: none; -ms-user-select: none; -webkit-touch-callout: none;"; el.textContent = '+'; header.appendChild(el); var sidebar = document.querySelector(".side"); sidebar.style.display = 'none'; el['onclick'] = function(){ sidebar.style.display = sidebar.style.display == 'none'? '' : 'none'; el.textContent = sidebar.style.display == 'none'? '+' : '-'; }; })();