arthurhammer/github-toc

Add support for other URLs

awrichar opened this issue · 1 comments

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.

I recently published 2 modules that might help you with this:

https://github.com/fregante/webext-domain-permission-toggle
https://github.com/fregante/webext-dynamic-content-scripts

You'd just need:

npm i webext-domain-permission-toggle webext-dynamic-content-scripts
// in background.js
import 'webext-dynamic-content-scripts';
import addDomainPermissionToggle from 'webext-domain-permission-toggle';

addDomainPermissionToggle();

And some adjustments to manifest.json