Skip to content

Instantly share code, notes, and snippets.

@wmill
Last active September 27, 2015 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmill/1262754 to your computer and use it in GitHub Desktop.
Save wmill/1262754 to your computer and use it in GitHub Desktop.
Greasemonkey GitHub Anonymizer, hides full names and photos so you won't be influenced by a potential candidate's name or appearance.
// ==UserScript==
// @name GitHub Anonymizer
// @namespace https://gist.github.com/raw/1262754/github_anonymizer.user.js
// @include http*://github.com/*
//
//
// ==/UserScript==
//
// borrowed some code from http://erikvold.com/blog/index.cfm/2010/6/14/using-jquery-with-a-user-script
// should now work in chrome
// a function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.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);
}
// the guts of this userscript
function main() {
$('img[src*="gravatar.com"][width="48"]').attr('src', 'http://www.placekitten.com/48/48');
$('img[src*="gravatar.com"][width="20"]').attr('src', 'http://www.placekitten.com/20/20');
$('img[src*="gravatar.com"][width="24"]').attr('src', 'http://www.placekitten.com/24/24');
$('img[src*="gravatar.com"][width="30"]').attr('src', 'http://www.placekitten.com/30/30');
$('img[src*="gravatar.com"][width="16"]').attr('src', 'http://www.placekitten.com/16/16');
$('.avatared em').text("Anonymous");
$('.fn').text("Anonymous");
}
// load jQuery and execute the main function
addJQuery(main);
@wmill
Copy link
Author

wmill commented Oct 4, 2011

At a recent ruby meetup the speaker was upset that GitHub profiles contain names and photos. He felt that employers browsing would be influenced by the gender and ethnicity of candidates.

Naturally the solution is, as always, kittens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment