# Clone or download zip file
git clone git@github.com:arthurhammer/github-toc.git
cd github-toc
# Install development dependencies
npm install
# Build unpackaged extensions for testing and running locally
npm run build
# Build extensions packaged for distribution
npm run dist
Packaged and unpackaged builds live in the dist folder.
Build the unpackaged extensions with npm run build. Then, install the extensions in the browsers as described below. Test it on the cases described in the test folder.
Manually:
- Open the extensions page in Chrome
- Choose
dist/chromeunder “Load unpacked extension...”
Command line:
npm run chromeopens a new Chrome instance with the extension installed.
Chrome has to be closed for this to work. The path to Chrome is hard-coded, change if needed.
Manually:
- Open
about:debuggingin Firefox - Choose
dist/firefox/manifest.jsonunder "Load Temporary Add-on"
Command line:
npm run firefoxopens a new Firefox instance with the extension installed.
See the documentation for Mozilla's web-ext tool.
- Open Extension Builder in Safari
- Add
dist/safari.safariextensionas existing extension - Click “Install”
Note: Unless you have a valid Safari Extension certificate, the extension will automatically be removed whenever you quit Safari. You will also not be able to build the packaged extension for direct install. The certificate requires a (paid) Apple Developer Program membership.
Install dist/github-toc.user.js directly in the browser if supported or with your favorite userscript manager (such as Greasemonkey or Tampermonkey).