Forum Moderators: martinibuster
Until this happens, I'm not going to modify the code. Some have mentioned that on a white text / black page, the search doesn't look right. (The img aliasing is wrong, and the color choices look funny). I whacked out a stylesheat that mostly fixes these problems. IOW, this html, when placed before the unmodified google code, changes the way the browser displys the google code.
Other's have probably done this, but I though I'd share what I did to save some the trouble. Here's the code. you'lll probably want to copy this to a copletely blank page, since I made some assumptions in this demo that could cause trouble with some exhisting layouts. (nothing that can't be fixed relatively easy though, but it's make the demo harder to follow)
### START ###
<body>
<style>
body{ background-color: #000000}
h1{color: #aabbcc}
h3{color: #aabbcc; padding: 5px; padding-bottom: -50px;}
div table{ background-color: #000000; color: #aabbcc;}
div table input{ background-color: #dddddd; }
div table font { display:none }
</style>
<h1>WebSearch Color Demo!</h1>
<div class="websearch">
<h3>Search This Site!</h3>
<!-- SiteSearch Google -->
your untouchable google code is in here
<!-- SiteSearch Google -->
</div>
<script>document.images[0].src="http://www.google.com/logos/Logo_25blk.gif";</script>
</body>
### END ###
This makes a black page, some light collored headers, and then the google websearch. then a single-line js call makes the google image switch to the black code. ( IE6/MZ compatible). you'll also notice that I hid the choice to search the site or internet via a display:none in the stylesheet.
Comments?
-pj
[edited by: JordanAutomations at 9:39 pm (utc) on June 19, 2004]
div table font { display:none }
to
div table font,a,img { display:none }
you really only need to make the add the a to the hide list, since the img is nested inside the anchor tag, but I tend to like the removing them both better.
-pj
added clarification
Therefore, my policy is to not do "stipid things", to put it bluntly. I think removing the logo would qualify as that. However, I'd do it in a spare account on a site I'm not concerned about using adsense on. I just wouldn't be surprised if it was kicked.
On the other hand, I think inverting the colors on a dark-based is a safe thing, since it makes the google bar fit in the way it was designed to, and not be an eye-sore.
And the advantage of doing it CSS-based is that a searcher script won't find it. It wold take human checking. And I personally think human checking is going to boot the logo-hider, and allow the color changer.
Anyway, the worst they'll do to you is kick you out. Its classic risk managemnt. I'm certainly not going to do it on all my sites. But I might on some.
-pj