Skip to content

Instantly share code, notes, and snippets.

@thewarpaint
Last active September 4, 2015 04:33
Show Gist options
  • Save thewarpaint/623d14707869ad992323 to your computer and use it in GitHub Desktop.
Save thewarpaint/623d14707869ad992323 to your computer and use it in GitHub Desktop.
Google Time Machine!

Google Time Machine!

Execute any of the code snippets below on google.com to randomize your logo and favicon. Works also for any other regional Google.com page.

(function () {
var element = document.getElementById('hplogo'),
logos = [
['logos/google.jpg', 351, 113, '//web.archive.org/web/20051227230824/http://www.google.com/favicon.ico'],
['images/title_homepage4.gif', 305, 115, '//web.archive.org/web/20081103214400/http://www.google.com/favicon.ico'],
['intl/en_ALL/images/srpr/logo1w.png', 275, 95, '//web.archive.org/web/20100227192757/http://www.google.com/favicon.ico'],
['images/srpr/logo9w.png', 269, 95, '//web.archive.org/web/20150831021002im_/http://www.google.com/favicon.ico'],
['images/branding/googlelogo/2x/googlelogo_color_272x92dp.png', 272, 92, '//www.google.com/images/branding/product/ico/googleg_lodp.ico']
],
logo = logos[Math.floor(Math.random() * logos.length)];
if(element.nodeName.toLowerCase() === 'img') {
element.src = '//www.google.com/' + logo[0];
element.width = logo[1];
element.height = logo[2];
} else {
element.style.backgroundImage = 'url(' + logo[0] + ')';
element.style.width = logo[1];
element.style.height = logo[2];
}
document.querySelector && (document.querySelector('link[rel="shortcut icon"]').href = logo[3]);
})();
!function(){var o=document.getElementById("hplogo"),e=[["logos/google.jpg",351,113,"//web.archive.org/web/20051227230824/http://www.google.com/favicon.ico"],["images/title_homepage4.gif",305,115,"//web.archive.org/web/20081103214400/http://www.google.com/favicon.ico"],["intl/en_ALL/images/srpr/logo1w.png",275,95,"//web.archive.org/web/20100227192757/http://www.google.com/favicon.ico"],["images/srpr/logo9w.png",269,95,"//web.archive.org/web/20150831021002im_/http://www.google.com/favicon.ico"],["images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",272,92,"//www.google.com/images/branding/product/ico/googleg_lodp.ico"]],g=e[Math.floor(Math.random()*e.length)];"img"===o.nodeName.toLowerCase()?(o.src="//www.google.com/"+g[0],o.width=g[1],o.height=g[2]):(o.style.backgroundImage="url("+g[0]+")",o.style.width=g[1],o.style.height=g[2]),document.querySelector&&(document.querySelector('link[rel="shortcut icon"]').href=g[3])}();
@thewarpaint
Copy link
Author

@nevermind89x Fixed!

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