Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.

Toggles

Rob Garrison edited this page Aug 10, 2016 · 7 revisions

Home | Toggles | Install | Extras

Sections: Code Wrap Toggle | Monospace Font Toggle | Diff File View Toggle

GitHub-Dark Script currently includes three toggles:

Code Wrap Toggle

All code blocks will have an attached icon in the upper right corner (2015-12-17 22_37_17-ideas issue 1 stylishthemes_github-dark-script)

Clicking this icon will override the global code wrap setting to either wrap or unwrap the contained code.

While hovering the icon, its color will change:

  • Green: Code wrapping is enabled.
  • Red: Code wrapping is disabled.

Clicking on the icon will toggle code wrapping for only that block of code.

code-wrap

Install this toggle separate from the GitHub-Dark script from GreasyFork.

Monospace Font Toggle

Every comment block will have a monospace font toggle button added to the toolbar.

monospace-font-toggle

Clicking the toggle button will change the textarea font from the default font to a monospaced font.

When the monospace font toggle is active, the following css is applied:

font-family: Menlo, Inconsolata, "Droid Mono", monospace !important; font-size: 1em !important;

Install this toggle separate from the GitHub-Dark script from GreasyFork.

Diff File View Toggle

When viewing a commit diff, a file toggle button is added to each file header.

diff-collapse-toggle

Click on the toggle button to either collapse or expand that file block:

In "enabled" mode, using Shift + Click will collapse or expand all file blocks to match the last clicked on toggle button.

diff-collapse

An "accordion" mode was added which makes the toggles behave like an accordion.

  • When the page is initially open, the top-most file block will stay open while all other blocks will collapse.
  • When a collapsed block toggle is clicked, the file will expand and all other blocks will collapse.
  • All blocks can still be collapsed, but using Shift + click won't do anything.

accordion-mode

Try it on this page!

Install this toggle separate from the GitHub-Dark script from GreasyFork.

Clone this wiki locally