Skip to content

Instantly share code, notes, and snippets.

@asimihsan
Last active September 30, 2020 16:57
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 asimihsan/b085adaf5fd577927faff796b9f4aa1f to your computer and use it in GitHub Desktop.
Save asimihsan/b085adaf5fd577927faff796b9f4aa1f to your computer and use it in GitHub Desktop.
Greasemonkey script for forcefully enabling sidebar for Rust docs, even for narrow pages
// ==UserScript==
// @name Enable Sidebar for Rust docs
// @namespace https://asim.ihsan.io
// @version 0.1
// @description Always enable sidebar on Rust documentation pages.
// @author Asim Ihsan.
// @match https://doc.rust-lang.org/*
// @grant none
// @run-at document-idle
// ==/UserScript==
(function() {
'use strict';
document.querySelector('html').classList.replace("sidebar-hidden", "sidebar-visible");
document.querySelector('html').style.setProperty("--sidebar-width", "15em");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment