Put the GitHub README TOC in the sidebar

Latest Version

Version
2.2.0
Update
March 7, 2024
Size
9.74KiB
Developer
Category
Users
143
Rating
5 ★
Manifest Version
3
Web Store Status
Languages Support
English
See more
Permissions
See more

GitHub TOC Sidebar Extension

GitHub TOC Sidebar enhances the accessibility on the readme of GitHub projects. It utilizes the builtin TOC (Table of Contents) component in GitHub, when scrolling down, the TOC will be opened and stick on the right side of the page, making it easier to view the outline of the content, and quicker to navigate around different sections. It's quite helpful when viewing projects that has long readme with multi-level table of contents.

Please note that this extension only works when all the circumstances are met:
1. You are viewing the home page of a project on GitHub, meaning that the URL must match the format https://github.com//, not subsidiary pages like https://github.com///blob/master/readme.md
2. The project has a readme file written in a markup language such as Markdown or RST
3. The readme file has headings that split content into multiple sections with titles
4. You scroll down the page further than the bottom of the right sidebar

To test if this extension works, you can open this page as an example: https://github.com/reorx/awesome-chatgpt-api
Read more

Source Manifest.json

{"update_url": "https://clients2.google.com/service/update2/crx", "manifest_version": 3, "name": "GitHub TOC Sidebar", "description": "Put the GitHub README TOC in the sidebar", "version": "2.2.0", "icons": { "16": "icon.png", "48": "icon.png", "128": "icon.png" }, "content_scripts": [ { "matches": [ "https://github.com/*/*" ], "css": [ "css/content_style.css" ], "js": [ "js/content_script.js" ] } ]}
Read more