Skip to content

Instantly share code, notes, and snippets.

@masukomi
Last active August 24, 2023 13:50
Show Gist options
  • Save masukomi/e6a3e2277cd03d566e2cd8fbda15c138 to your computer and use it in GitHub Desktop.
Save masukomi/e6a3e2277cd03d566e2cd8fbda15c138 to your computer and use it in GitHub Desktop.
tampermonkey script to make ruby docs more readable. The min-width of documentation may be a bit too much, but it's a good starting point for you to tweak. ;)
// ==UserScript==
// @name Readable Ruby Docs
// @namespace https://masukomi.org/
// @version 0.1
// @description make the core description text wider
// @author You
// @match https://ruby-doc.org/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=ruby-doc.org
// @grant GM_addStyle
// @sandbox raw
// ==/UserScript==
GM_addStyle(`
/* .class #documentation,
.file #documentation,
.module #documentation,*/
.adzbox {
display: none;
}
#documentation {
min-width: 1000px !important;
max-width: 999999px;
/*margin: 0rem 1rem 5rem 5rem !important;*/
}
#metadata{
/* fit-content makes it too wide because of invisible things*/
min-width: 15rem !important;
margin-right: 2rem !important;
}
div.wrapper {
margin-left: 2rem !important;
}
.adzbox{
display: none;
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment