Greasy Fork is available in English.

GitHub Table of Contents

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Tác giả
Mottie
Cài đặt hàng ngày
0
Số lần cài đặt
705
Đánh giá
19 0 1
Phiên bản
2.1.6
Đã tạo
29-03-2016
Đã cập nhật
17-02-2024
Kích thước
20 KB
Giấy phép
MIT
Áp dụng cho

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

  • NOTE: When updating to v2.0+, you may have to reset the popup (g + r) as the positioning method has changed.
  • A draggable popup window is automatically added when rendered markdown is detected; there must be at least three anchors before the TOC is created.
  • The TOC will refresh while switching between pages, and previewing markdown changes.
  • Move (drag-and-drop): 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 to reset the position.
  • Toggle Window
    • Click on the header icon to toggle the window between the upper right corner and its last position.
    • Double-click on the header text to toggle the window.
    • Or, use the keyboard shortcut to toggle the view.
  • Toggle Entries
    • Each anchor within the rendered markdown will be included in the TOC window.
    • Click on the arrow next to the anchor link to toggle the sub-group.
    • Shift + Click on the arrow next to the anchor to toggle all same level items.
    • Some anchor link text may be truncated, hover over the link to see the full title.
  • 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.
  • See the change log here.
  • Then test it on this page.

github-toc

Hosted with ♥ at GitHub