arthurhammer / github-toc Goto Github PK
View Code? Open in Web Editor NEW:book: Browser extension that adds a table of contents to GitHub repos, wikis and gists.
Home Page: https://goo.gl/fyMGaf
License: MIT License
:book: Browser extension that adds a table of contents to GitHub repos, wikis and gists.
Home Page: https://goo.gl/fyMGaf
License: MIT License
Apparently, Github has changed the markup somehow, however, the button is not appearing any more since a couple of months.
There are a few cases where multiple files/markups appear on the same page, e.g. multiple readmes in gists. Currently a table of contents is only shown for the first one. See this example.
It would be much better (could get easier/secure for users) to get it as official safari extension (same as its done for ff and chrome now).
See
https://safari-extensions.apple.com/?q=GitHub
This potentially relastes relates to
#10
Can it analyze the markdown code for a wiki page, and generate the markdown code for a TOC for that page, that I can add to the page?
If so, how?
If not, please consider this a feature request.
Example: https://github.com/mbostock/d3/wiki
Update: v0.2.5 passed full review with the following notes from the reviewer:
Please note the following for the next update:
- Using innerHTML to modify a document causes the entire document to be re-parsed, which is inefficient and has critical drawbacks, including invalidating any JavaScript reference to replaced DOM nodes, clearing any JavaScript properties and event listeners on replaced DOM nodes, and re-executing any script tags in the changed markup, and causing said scripts to fail if they rely on document.write.
https://developer.mozilla.org/en/XUL_School/DOM_Building_and_HTML_InsertionAdditionally, due to both security and performance reasons (can be 100s of times slower), innerHTML (or similar method of converting strings to DOM e.g. outerHTML, insertAdjacentHTML, parseFromString, createContextualFragment, JQuery append/prepend/appendTo/html/before/after/insertBefore/insertAfter) should not be set using dynamic values. This can lead to security issues or fairly serious performance degradation.
For inserting text, textContent (or JQuery text) or createTextNode() should be used instead of innerHTML.
For inserting HTML, the safer method is to use createElement(), textContent, appendChild() instead of innerHTML.
Removing the innerHTML will improve add-on's prospect of approval.
These should be tracked and fixed.
Just wanted note that it's not compatible with Github TOC userscript
Could it be a good idea to support the ToC on issues page?
Because some love to write something on issue page, of course, on the first block of issue page
If it support on gists, there is no reason to not support on issue page
π thanks for your plugin, do love it
The older Mozilla Add-on SDK we are currently using is being phased out in favor of the new WebExtensions API.
The Firefox version should be ported to this new API. The good thing is that WebExtensions mostly resemble Google Chrome extensions which should make porting easy.
Todo:
Thanks for the useful extension! Would be even more useful if I could apply it when browsing GitHub Enterprise sites. I can manually unpack the plugin and add URLs to the Chrome config, but if this could be a native setting, it would be great.
Problem:
Reason:
GitHub changed the right
css class to float-right
. To fix this we'll probably use a custom class to avoid the same issue in the future.
Screenshot:
Version:
Version: 0.2.4
Browsers: all
Keyboard nav works, but that is all.
The Safari version is currently stuck in limbo on 0.2.3. My Safari certificate expired so I canβt release a new build. At the same time,SafariUpdate.plist
links to 0.2.4 prompting Safari users to update to a nonexistent version.
Either:
SafariUpdate.plist
to 0.2.3Done.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.