StylishThemes / GitHub-Dark

:octocat: Dark GitHub style
https://raw.githubusercontent.com/StylishThemes/GitHub-Dark/master/github-dark.user.css
BSD 2-Clause "Simplified" License
9.66k stars 654 forks source link

Support custom domain for GitHub enterprise instances #1086

Open AlexDaciuk opened 4 years ago

AlexDaciuk commented 4 years ago

Describe the change you'd like Hello!

I work at Globant and they have two custom Github Instances that have a diferent URL

Example:

github.globant.com

Is there a way to make the theme work in this kind of custom instances making the URL that matches more generic in some way?

the-j0k3r commented 4 years ago

Hello, this has been an issue for a long time and no one can agree on a solution, there is https://github.com/StylishThemes/GitHub-Dark/pull/938 for that effect but its going no where fast.

I think depends on https://github.com/openstyles/stylus/issues/708.

Failing that you will have to manually add the domains to the top of the usercss manually.

Bare in mind that editing the usercss because you edited it it stops the auto-update from working so as to not remove your customization.

Thers also a difference between the CSS for GitHub Enterprise and regular GitHub so that presents its challenges also.

silverwind commented 4 years ago

https://github.com/openstyles/stylus/issues/767 indicates USO vars should work inside domain(), so we can probably add a custom domain option.

Question is really if a domain("") will break anything, but I don't expect it to. Could probably also support regex so users can match multiple domains.

LunaticoCR commented 4 years ago

I've been using this theme on my company's GHE for a while now and at first the lack of support for a custom url was my main issue and I tried a few different things etc but soon realised I had an even bigger problem with versioning. The version of GHE is controlled by each company, and tend to be behind the public version of GH, and this meant that if I kept my theme up-to-date a lot of things would break. So I opted to fork my own version and I modified it to point to my fork's updateURL and then applied my url changes there. So now I'm fixed to the same theme version and almost never breaks, I say almost because some times when my company does an update of the GHE version then my theme breaks so when this happens it's an exercise of trial and error to narrow down the most recent version that is not broken, or in other words an older version that was created for a GH public version similar to what I'd currently have in GHE.

silverwind commented 4 years ago

Yeah, GHE is and probably never will be properly supported because public GH moves much faster. We can at least give a user an option to try it, but it'll certainly a subpar experience unless the instance can auto-update or something.