Don’t like Google’s redesign? Greasemonkey to the rescue


So Google redesigned their search homepage, to include a black highlight bar for their other service offerings on top of the page.

I think it looks pretty good, but my girlfriend, who is a more visual person than I am, and has better aesthetic sense too, absolutely hated the fact that she was greeted by an imposing, dark bar on top of every new browser window.

What’s a good boyfriend to do? Never one to turn down an opportunity for geekery, I installed Greasemonkey on Firefox, and whippe up a little script to set a different color.

Here’s the script, if you want it:

// ==UserScript==
// @name           google in farbe statt schwarz
// @namespace      https://elmar.wordpress.com
// @include        google*
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
// ==/UserScript==

var lovelyPink = '#A167E4';
$("div #gbx4").css('background-color',lovelyPink);
$("div #gbx3").css('background-color',lovelyPink);

Eh, voila, here’s Google search in a lovely (?) pink:

Google search page with pink top bar

On a less playful note, this kind of thing is also useful to change color of admin interfaces depending on the server’s url. For example, when developing hybris-based online shops, I use a similar script to color the management console green on test servers, and red on production systems.


Blog at WordPress.com.

%d bloggers like this: