Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Github Enterprise #75

Open
ncuillery opened this issue May 16, 2016 · 4 comments
Open

Support Github Enterprise #75

ncuillery opened this issue May 16, 2016 · 4 comments

Comments

@ncuillery
Copy link

Hello,

Thanks for this awesome chrome extension. It would be great if it could work with Github Enterprise, i.e. the Github interface hosted on a private server (and a private host).

I manage to make it work by

  • cloning the repo,
  • add my host in the manifest
  • replace github.com by location.host here
  • install the extension as an unpacked extension in Chrome.

I don't know if the Chrome extension API allows dynamic content scripts url patterns. Maybe a large permissive pattern is inevitable here 😒

@stefanbuck
Copy link
Member

Your workaround is indeed not ideal, but in general it's possible. As you already noticed, the code base isn't ready for this feature. Would you like to write a PR for this?

Basicly to make this work, three steps have to be done.

First, an options page have to be added so the user can enter a custom domain. I would recommend to store the value in the LocalStorage. Second, request permissions for the the entered url via permissions API. Finally, a smallish code refactoring have to be done to get the base url from one place. Check out the notifier-for-github-chrome extension to see how this can be implemented. Last but not least, I'll create soon a Firefox version of the OctoLinker, so we have to check how to get this working in both browsers.

I will support you as much as I can to make this happen.

@automaticgiant
Copy link

automaticgiant commented May 26, 2017

just like https://github.com/buunguyen/octotree as another example. (these go great together)

@fregante
Copy link
Collaborator

fregante commented Aug 7, 2019

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

It would also solve #113

Here I wrote more about how it works too.

@stefanbuck
Copy link
Member

This looks amazing @fregante Thanks for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants