John Bokma Greasemonkey
freelance Perl programmer

Google Unsafe Sites early warning

Stop malicious programs getting on your computer | 0 comments

Since January 2006, Google warns about unsafe sites if you click on a link in the search results. Since I preferred an earlier warning as in: before I click, I wrote a small GreaseMonkey script. If you use Mozilla Firefox as your browser, and have the GreaseMonkey extension installed, you can use this small script as well.

First, create an empty file google-badware.user.js and open it in an editor. Copy and paste the code below into the file, change '' to your preferred Google location (twice), and save the edited file.

// ==UserScript==
// @name        Google BadWare
// @namespace
// @description Highlights link(s) that are considered badware
// @include*
// @exclude
// ==/UserScript==

var links = document.getElementsByTagName( 'a' );
var element;

for ( var i = 0; i < links.length; i++ ) {

    element = links[ i ];

    if ( element.href.indexOf( "" ) == 0 ) { = "#ffffff"; = "#ff0000";

Drag and drop the JavaScript file you created into the Mozilla Firefox main window. Just above the contents a bar is displayed with the following text: "Greetings, fellow traveler. This is a Greasemonkey User Script. Click Install to start using it". Press the install button to the right of this message.

Test queries: 'serial crackz warez' or '' (without the quotes).

Please post a comment | read 0 comments | RSS feed