Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Greyscale MSE Favicon
// @description It's just easier to distinguish.
// @namespace michaelb958
// @author michaelb958, Ilmari Karonen
// @license MIT (http://opensource.org/licenses/MIT)
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.stackapps.com/*
// @match *://*.mathoverflow.net/*
// @match *://*.askubuntu.com/*
// @grant none
// ==/UserScript==
function with_jQuery(f) {
var s = document.createElement("script");
s.type = "text/javascript";
s.textContent = "(" + f.toString() + ")(jQuery)";
s.setAttribute('data-with-jquery', '');
document.head.appendChild(s);
};
with_jQuery(function($) {
var icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gQSCAYSQIBpXQAAAPtJREFUOMu1krFKxTAUhr8kRXF0FB+k4CpOzk6dFBfBPklewEHolN2hT1FwFARXaaAUW6QtCEKcoqm31Fy4/pAhJ/zn5Ps5wjkHQFVVCXANHLKuDrhP0/TTOUfiq0KIB6XUOREahuEUuACQvqiUOosxj+PINE0/g5xzeIxtNUMoy3K1S9d19H3/fc/zXMwQtjFvfGMnCEVRbHRp25amaRbNWut1hDXz/yBorV+llMfWWqy1f+4ScAQMMtjE/UgzwAGwN8ugrusra20FPAbnGfj4ZX4BLo0xbwDC8wshFkdlWRYGdGOMuQszkJF5vQO3odkriWxwYox5Wnr4AsusgVErbYK7AAAAAElFTkSuQmCC';
if (location.hostname == 'meta.stackexchange.com') {
$('link[rel="shortcut icon"]').attr('href', icon).detach().appendTo(document.head);
}
$(document.head).append('<style>.favicon.favicon-stackexchangemeta { background: url("'+icon+'") }</style>')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment