Open erikdw opened 9 years ago
It looks like https://github.com/jamesmmchugh/wide-github is a fork that matches any URL. Or prawnpie/wide-github@20c700252f76ff652de88fce4fbf5f05ee82a5c5 shows how to make a version specific to your organisation.
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).
@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.
So for future reference here's how I accomplished it:
greasemonkey for firefox allows to add "included sites" url pattern
@ygrek : can you give more info on that proposal?
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
In Greasemonkey if you select "Manage User Scripts..." you can add something like *https://github.*
to "Included Pages" under the wide-github preferences.
@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.
ftr tampermonkey for chrome also allows to override include pattern without modifying script - convenient
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.
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?