MediaWiki:Skin/DontFeedTrolls.js: Unterschied zwischen den Versionen

aus Kamelopedia, der wüsten Enzyklopädie
Zur Navigation springen Zur Suche springen
K hm ... irgendwas funzte da plötzlich net mehr
K kurz was ausprobieren
Zeile 5: Zeile 5:
checkLinks = checkList[i].getElementsByTagName('a');
checkLinks = checkList[i].getElementsByTagName('a');
for(var j = 0; j < checkLinks.length; j++) {
for(var j = 0; j < checkLinks.length; j++) {
if(checkLinks[j].title == 'Kamelopedia:Trollwiese') {
if(checkLinks[j].title.split('/')[0] == 'Kamelopedia:Trollwiese') {
checkList[i].style.display = 'none';
checkList[i].style.display = 'none';
}
}

Version vom 12. Januar 2010, 23:11 Uhr

window.onload = function () {
	if (typeof(showTrolls) != 'undefined' && showTrolls) return;
	checkList = document.getElementById('content').getElementsByTagName('li');
	for(var i = 0; i < checkList.length; i++) {
	checkLinks = checkList[i].getElementsByTagName('a');
		for(var j = 0; j < checkLinks.length; j++) {
			if(checkLinks[j].title.split('/')[0] == 'Kamelopedia:Trollwiese') {
				checkList[i].style.display = 'none';
				}
			}
		}
	}