Skip to content

Instantly share code, notes, and snippets.

@robbyrussell
Created January 12, 2009 22:15
Show Gist options
  • Select an option

  • Save robbyrussell/46193 to your computer and use it in GitHub Desktop.

Select an option

Save robbyrussell/46193 to your computer and use it in GitHub Desktop.
Greasemonkey script to change the favicon for Google to a old and improved (and less colorful one)
// ==UserScript==
// @name BetterFavicon
// @namespace planetargon
// @description A better favicon for google
// @include http://*.google.com/
// ==/UserScript==
var favicon_link_html = document.createElement('link');
favicon_link_html.rel = 'icon';
favicon_link_html.href = 'http://robbyonrails.com/files/google-favicon.ico';
favicon_link_html.type = 'image/x-icon';
try {
document.getElementsByTagName('head')[0].appendChild( favicon_link_html );
}
catch(e) { }
@MarkJeronimus
Copy link

MarkJeronimus commented Feb 4, 2025

// ==UserScript==
// @name        BetterFavicon
// @namespace   planetargon
// @version     2
// @description Trello without dynamic favicon (broken with Fingerprint Resisting on)
// @include     https://trello.com/*
// @grant       none
// ==/UserScript==

function setFavIcon() {
  var link = document.querySelector("link[rel~='icon']")||document.createElement('link');
  link.rel  = 'icon';
  link.type = 'image/x-icon';
  link.href = 'https://trello.com/assets/favicon.ico';
  (document.head||document.getElementsByTagName("head")[0]).appendChild(link);

  window.setTimeout(setFavIcon, 10000);
}

window.setTimeout(setFavIcon, 5000); // Approximately how long it takes to the first favicon update (on my machine)

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