linyows / github-wiki-search

:octocat: Search wiki of the repository on Github
http://userscripts.org/scripts/show/129930
Other
198 stars 25 forks source link

GitHub Enterprise support #16

Open TheJaredWilcurt opened 9 years ago

TheJaredWilcurt commented 9 years ago

You have the github website hardcoded. It would be nice if there was an options page for users to add in custom URLs/domains for this to work on. Many companies have the enterprise version of GitHub and being able to search the wiki at work would be super useful.

If nothing else, you could just add in a regex thing to look for http(s)://githib.*.com/*/*/wiki

  function allowedLocation(callback) {
    if (/^https?:\/\/github\.com\/.*?\/.*?\/wiki/.test(location.href)) {
      callback();
    }
  }
soasme commented 9 years ago

+1

ccampanale commented 9 years ago

+1

ccampanale commented 9 years ago

In the meantime, I made this. I'm still testing it to ensure it isn't breaking anything but it seems to be working as intended until the extension can include support for GHE installations.

ccampanale commented 9 years ago

I agree with @TheJaredWilcurt though I think a better regex would be /^https?:\/\/github\..*?\/.*?\/.*?\/wiki/ as this would return true for both public and enterprise GitHub installations. That being said, I believe the real limitation here is in the manifest of the Chrome extension as you have to define on which sites you want the script to run. Though I may be wrong!

judwhite commented 9 years ago

+1, though our subdomain contains 'github' it doesn't start with it.

kleinen commented 8 years ago

+1

TheJaredWilcurt commented 8 years ago

Really the correct answer is to just let people type in the root for their own github server, even if it's just localhost:8080.

Though, auto-guessing would be cool too.

ccampanale commented 8 years ago

Hrmmm we never closed this issue... lol

This is done and it's a feature now for anyone who is curious. And you can do exactly that @TheJaredWilcurt; there's an options page that lets you define for which domains you want the extension to run on.

TheJaredWilcurt commented 8 years ago

@ccampanale

I just downloaded the extension and tried it on both github and ghe, and neither worked. There's also no options page.

options

kleinen commented 8 years ago

I also am unable to find the options you refer to.

ccampanale commented 8 years ago

Guys, my bad... I got the extension mixed up; I was thinking this was another one that I contributed to that recently got enterprise support... :-/ This one unfortunately still has no support for enterprises... :( Sorry