Skip to content

Instantly share code, notes, and snippets.

@amichal
Created September 26, 2012 15:24
Show Gist options
  • Save amichal/3788682 to your computer and use it in GitHub Desktop.
Save amichal/3788682 to your computer and use it in GitHub Desktop.
GitHub Tweaks
To use on OSX:
1.allow extension installs from github
$defaults write com.google.Chrome ExtensionInstallSources -array "https://*.github.com/*"
2. restart Chrome
3. come back here and click the 'raw' link for github_gr.user.js
4. allow Chrome to install the script above as a user extension
5. go to github issues list.
6. behold that the little useless pictures to the right of issues now take you to the issue list filtered for that user
7. Embrace and extend.
// ==UserScript==
// @match https://github.com/*
// @name GitHub Tweaks for Green River Employees
// @namespace GitHubGr
// @author Aaron Michal ([email protected])
// @description Changes some aspects of the github to suck less for us.
// ==/UserScript==
// a function that loads jQuery and calls a callback function when jQuery has finished loading
function require_jquery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
function github_gr() {
var $ = jQuery;
var repo = window.location.pathname.match(/^\/[^\/]+\/[^\/]+\//);
jQuery('a.assignee').each(function(a){
this.href = repo + 'issues/assigned' + $(this).attr('href');
console.log(repo, this.href);
})
}
require_jquery(github_gr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment