-
-
Save vyznev/11071156 to your computer and use it in GitHub Desktop.
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 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