GitHub TOC

A userscript that adds a table of contents to readme & wiki pages

目前為 2016-07-05 提交的版本,檢視 最新版本

作者
Mottie
評價
0 0 0
版本
1.1.2
建立日期
2016-03-29
更新日期
2016-07-05
尺寸
14.0 KB
授權條款
https://creativecommons.org/licenses/by-sa/4.0/
腳本執行於

A userscript that adds a table of contents to both readme and wiki pages.

  • A draggable popup window is automatically added when rendered markdown is detected; there must be at least one anchor.
  • The TOC will refresh while switching between pages, and previewing markdown changes.
  • Click and hold on the header to move the TOC window. If it gets moved and you can't get it back, use the keyboard shortcut.
  • Click on the header icon to toggle the window between the upper right corner and its last position. Or use the keyboard shortcut.
  • Each anchor within the rendered markdown will be included in the TOC window.
  • Some anchor link text may be truncated, hover over the link to see the full title.
  • Click on the arrow next to the anchor link to collapse the sub-group.
  • Shift + Click on the arrow next to the anchor to toggle all same level items.
  • To modify the "Table of Contents" text, open the userscript addon popup window and look for the "Set Table of Contents Title" setting.
  • Keyboard commands:
    • Press Esc to "hide" the TOC in the upper right corner.
    • Press g + t, within one second of each other, to toggle the TOC view.
    • Press g + r, within one second of each other, to reset the TOC position.

github-toc

Hosted with ♥ at GitHub

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址