// ==UserScript==
// @name eurotv.com - Grid channels remover
// @author Eric Darchis 
// @namespace http://www.darchis.be/eric/blog/index.php?Userscripts 
// @version 1.1
// @description  Removes unwanted channels from the 'TV by Grid'
//			feature of www.eurotv.com
// @ujs:category site: enhancements
// @ujs:published 2005-09-29 09:50
// @ujs:modified 2005-09-29 09:59
// @ujs:documentation http://userjs.org/scripts/site/enhancements/eurotv-com-hide-channels 
// @ujs:download http://userjs.org/scripts/download/site/enhancements/eurotv-com-hide-channels.js 
// @include http://www.eurotv.com/scripts/grid*
// ==/UserScript==

/* 
 * Copyright © 2005 by Eric Darchis
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 */


document.addEventListener('load', function() {
	// Add the list of channels to hide here
	var badChannels= new Array('AB 3', 'AB 4', 'ARTE', 'BE CINE', 'BE 1', 'BE SPORT', 'Eurosport', 'Liberty', 'MCM', 'Plug', 'Teletoon');
	var toDel=new Array();
	var items=document.getElementsByTagName('b');
	for (var i=0; i<items.length;i++) {
		for (var j=0; j<badChannels.length; j++) {
			if (items[i].innerHTML.indexOf(badChannels[j]) != -1) {
				toDel[toDel.length]=items[i].parentNode.parentNode.parentNode; // TR level
			}
		}
	}
	for (var i=0; i<toDel.length; i++) {
		toDel[i].parentNode.removeChild(toDel[i]);
	}
}, false);
