kwc.org Photos Spare Cycles MythBusters

Protective Tour Googles

Courtesy of Hogue, I now have this greasemonkey script to shield my eyes from inadvertent Tour revelations. I've pasted the code below for those who may find themselves in similar situations requiring selective news display.

As for real world news filters, Team Uni is doing a great job protecting me already. At dinner tonight parakkum told me to keep my eyes on my plate and not look up -- Stage 11 was on TV. The alarm was unnecessary as I'd seen Stage 11 this morning, but it shows that the team is on form today and ready to go.

// ==UserScript==
// @name No Tour
// @description pop up an alert on any page containing Tour de France info
// @include *
// ==/UserScript==

var badness = new Array(6);
badness[0] = 'armstrong';
badness[1] = 'tour de france';
badness[2] = 'cycling';
badness[3] = 'yellow jersey';
badness[4] = 'lance';
badness[5] = 'tdf';

function check() {
	var body = document.getElementsByTagName('body')[0].innerHTML.toLowerCase();
	for (var i = 0; i < badness.length; i++) {
		var index = body.indexOf(badness[i]);
		if (index > 0) {
			var temp = document.getElementsByTagName('body')[0].innerHTML;
			document.getElementsByTagName('body')[0].innerHTML = '<div 

align="center"><h1>SHIELD YOUR EYES</h1></div>';
			alert("The goggles, they do nothing!");
			alert(badness[i]+" is mentioned on this page");
			document.getElementsByTagName('body')[0].innerHTML = temp;
			return;
		}
	}
}

window.addEventListener('load', check, true);

Post a comment


tags.

related entries.

what is this?

This page contains a single entry from kwc blog posted on July 14, 2005 12:12 AM.

The previous post was Tour de Comic-Con: Team Roster.

The next post is Tour de Comic-Con: Prologue.

Current entries can be found on the main page.