Last active
September 27, 2015 11:28
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.