glebm / render-whitespace-on-github

Are they tabs? Are they spaces? How many? Never wonder again!
MIT License
76 stars 12 forks source link

support for github enterprise #6

Open neumayr opened 6 years ago

neumayr commented 6 years ago

Nice Extension 👏

Sadly it does not work on a GitHub Enterprise installation.

Research

The current match patterns don't allow to whitelist a subdomain, like: https://github.*.*/* However this pattern doesn't guarantee success. Enterprise installations can have custom hostname configurations. A custom hostname in options settings make sense, but can't override the matches array.

References

glebm commented 6 years ago

I don't use GitHub Enterprise but feel free to send a PR adding this feature.

glebm commented 6 years ago

@neumayr Refined GitHub seems to use https://github.com/bfred-it/webext-domain-permission-toggle and https://github.com/bfred-it/webext-dynamic-content-scripts, as per the example in https://github.com/bfred-it/webext-dynamic-content-scripts#usage.

neumayr commented 6 years ago

@glebm Thx for the tips. In theory, it looks simple. I tried and failed on the setup.

resuna commented 5 years ago

Maybe just have a prefs option to add domains you want to apply it to?

fregante commented 5 years ago

@neumayr what was the problem? I recently rewrote them and now you should just need this:

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

addDomainPermissionToggle();

And some adjustments to manifest.json

I also wrote about how it works if you're interested.