Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name IRCButt Hide Sidebar
// @namespace http://userstyles.org
// @description Hides the sidebar. Hover on side to toggle visibility.
// @author ahtanu
// @homepage http://userstyles.org/styles/97987
// @include https://ircbutt.com*
// @include https://www.ircbutt.com*
// @include https://alpha.ircbutt.com*
// @run-at document-start
// ==/UserScript==
(function() {
var css = "div#sidebarwrapper div#sidebar {\n display:none !important;\n }\n div#mainwrapper {\n padding-right:5px !important;\n padding-left:5px !important;\n }\n\n div#sidebarwrapper:hover div#sidebar {\n display:block !important;\n }\n div#sidebarwrapper:hover + div#mainwrapper {\n width:auto !important;\n padding-right:201px !important;\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