Skip to content

Instantly share code, notes, and snippets.

@AmaanC
Last active August 29, 2015 13:58
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 AmaanC/10356448 to your computer and use it in GitHub Desktop.
Save AmaanC/10356448 to your computer and use it in GitHub Desktop.
Replaces all of the default identicon gravatar images on SO Chat with retro gravatar images. Click raw, and drag and drop in Extensions to install in Chrome.
// ==UserScript==
// @name Retro Gravatar
// @author Amaan Cheval
// @description Use retro gravatars instead of the indenticon ones
// @include http://chat.stackexchange.com/rooms/*
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
var update = function () {
[].forEach.call(document.querySelectorAll('.avatar > img'), function (elem) {
elem.src = elem.src.replace('identicon', 'retro');
});
};
document.body.addEventListener('DOMNodeInserted', update);
update();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment