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 for Github Enterprise #9

Open
erikdw opened this issue May 5, 2015 · 12 comments
Open

Support for Github Enterprise #9

erikdw opened this issue May 5, 2015 · 12 comments

Comments

@erikdw
Copy link

erikdw commented May 5, 2015

My company uses GitHub Enterprise, and that's where I really want this functionality.
Maybe there could be an option for applying the widening changes a list of sites?

@moreati
Copy link

moreati commented Jul 7, 2015

It looks like https://github.com/jamesmmchugh/wide-github is a fork that matches any URL. Or prawnpie/wide-github@20c7002 shows how to make a version specific to your organisation.

@xthexder
Copy link
Owner

xthexder commented Jul 7, 2015

I would recommend just forking this and changing the URL yourself. I'm hesitant to make this work on enterprise because it would require running some JS on every site to figure out if it's github or not (because there's not standard enterprise url).

@erikdw
Copy link
Author

erikdw commented Jul 8, 2015

@moreati : thanks! I was able to use @jamesmmchugh's repo and it worked for my company's Github Enterprise setup (our domain starts with "github.", I'm assuming that's why it worked given the URLs in the manifest). Thankfully James had instructions on his repo's README for loading an unpacked extension, because I had no idea how to load this.

@xthexder: I was thinking something along the lines of adblock where you can add hosts/URLs for the change to be applied. But given I know nothing about chrome extension development, I cannot guess whether that's a ton of work or not.

@erikdw
Copy link
Author

erikdw commented Jul 8, 2015

So for future reference here's how I accomplished it:

  1. cloned https://github.com/jamesmmchugh/wide-github (notably the latest commit was 75f545c)
  2. followed Chrome instructions for loading unpacked extension, pointing at the base dir of the cloned repo: https://developer.chrome.com/extensions/getstarted#unpacked
  3. Profit.

@ygrek
Copy link

ygrek commented Jul 14, 2015

greasemonkey for firefox allows to add "included sites" url pattern

@erikdw
Copy link
Author

erikdw commented Jul 14, 2015

@ygrek : can you give more info on that proposal?

@ygrek
Copy link

ygrek commented Jul 14, 2015

it's not a proposal, greasemonkey plugin for firefox has the functionality to change url patterns builtin, so I can use thise userscript for github enterprise just adding one line in plugin settings

@xthexder
Copy link
Owner

In Greasemonkey if you select "Manage User Scripts..." you can add something like *https://github.* to "Included Pages" under the wide-github preferences.

@erikdw
Copy link
Author

erikdw commented Jul 14, 2015

@xthexder : thanks for the detailed explanation (I don't know anything about greasemonkey or other browser plugin development/hacking stuff). @ygrek : thanks for original idea.

@ygrek
Copy link

ygrek commented Jun 12, 2017

ftr tampermonkey for chrome also allows to override include pattern without modifying script - convenient

@xthexder xthexder changed the title option to apply widening on github-enterprise sites? Support for Github Enterprise May 26, 2019
@fregante
Copy link

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

Here I wrote more about how it works too.

This only works for the browser extension and not the userscript. The only code that runs is to check whether the extension has permission to the current URL.

@LunaticoCR
Copy link

So for future reference here's how I accomplished it:

  1. cloned https://github.com/jamesmmchugh/wide-github (notably the latest commit was 75f545c)
  2. followed Chrome instructions for loading unpacked extension, pointing at the base dir of the cloned repo: https://developer.chrome.com/extensions/getstarted#unpacked
  3. Profit.

An even easier option perhaps for those not interested in cloning the repo etc. These instruction are for Brave Browser, but should be very similar for Chrome.

  1. Install the extension https://chromewebstore.google.com/detail/wide-github/kaalofacklcidaampbokdplbklpeldpj
  2. Go to extension location, for macOS it's ~/Library/Application\ Support/BraveSoftware/Brave-Browser/Profile\ 4/Extensions/kaalofacklcidaampbokdplbklpeldpj (make sure to point to the right profile number)
  3. Right-click the kaalofacklcidaampbokdplbklpeldpj directory and chose compress to zip it up
  4. Back to extension in your browser and remove the Wide GitHub extension
  5. Back to your extensions folder and unzip the extension you zipped in step 3
  6. Open the /manifest.json file and add your GHE domain to the $.content_scripts.matches list and save this change
  7. Open the extension section in the browser and go to developer mode, select "Load Unpacked" and go to the kaalofacklcidaampbokdplbklpeldpj directory and click select
  8. This will install the modified extension

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

No branches or pull requests

6 participants