Katz hacked

By THE_DRAGON_AWAKES Last update Apr 7, 2009 — Installed 2,357 times. Daily Installs: 4, 12, 11, 0, 6, 3, 0, 1, 3, 3, 2, 2, 5, 1, 1, 5, 0, 1, 1, 3, 5, 3, 1, 2, 0, 3, 3, 5, 2, 1, 2, 3

There are 8 previous versions of this script.

// ==UserScript==
// @author         THE_DRAGON_AWAKES
// @version        3.8
// @name           Katz hacked
// @namespace      katz.cd@hotmail.com
// @description    Hide the unneeded elements and ads on Katz.cd Downloads
// @include        http://katz.ws/*
// @include        http://katz.cd/*
// @include        http://games.katz.cd/*
// @include        http://apps.katz.cd/*
// @include        http://tv.katz.cd/*
// @include        http://movies.katz.cd/*
// @include        http://music.katz.cd/*
// @include        http://ebooks.katz.cd/*
// @include        http://other.katz.cd/* 
// @include        http://www.katzporn.com/*
// @scriptsource   http://userscripts.org/scripts/show/34276
// ==/UserScript==






function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}



function selectTheme(){
	var chtheme = ctheme.value;
	if(chtheme == "original"){
		addGlobalStyle(original);
	}
else 
	if(chtheme == "dark"){
		addGlobalStyle(dark);
	}				
else 
	if(chtheme == "gnr"){
		addGlobalStyle(gnr);
	}
else 
	if(chtheme == "mblue"){
		addGlobalStyle(mblue);
	}
	GM_setValue('theme', chtheme)
}	
	  


var newlinks = "Change Theme: <select id='stheme' tabindex='3' name='t'><option value='original'>Original</option><option value='dark'>Darkness</option><option value='gnr'>Golden</option><option value='mblue'>Mystic Blue</option></select><span>|</span><a id='star' title='Add to Favorites' target='_self' style='color: purple'href='javascript:book();'>Bookmark Us</a><br/><a href='http://www.katzforums.com/' style='color: green'>>Katz Forums</a><span>|</span><a href='http://katz.cd/faq.php' style='color: navy'>>FAQs</a><span>|</span><a class='snap_noshots' href='http://katz.cd/webmasters.php' style='color: #FF8040'>>Webmasters</a><span>|</span><a class='snap_noshots' href='http://katz.cd/faq.php#Contact' style='color: red'>>Contact Us</a>";
document.getElementById('pans').getElementsByTagName('div')[0].innerHTML = newlinks;


var original = 'body {background-color: #FFFFFF; color: #000000;}' + 
			  'a:visited {color: #FF0000;}' + 
			  'a:link, tbody a:link, tbody, #pans div a{color: #003366;}' +
			  '#pans {background: #C9E9F4 url(http://s.katz.cd/bg3.gif) repeat-x scroll center top; color: #003366;}' +
			  '#tabs a, #pg td a{background: #2F94BA url(http://s.katz.cd/bg4.gif) repeat-x scroll center top; color: #FFFFFF}' + 
			  '.dl1 {background: #C9E9F4 url(http://s.katz.cd/bg1.gif) repeat-y scroll left center;}' +
			  '.dl2 {background: #E7F7FB url(hhttp://s.katz.cd/bg5.gif) repeat-y scroll left center;}' +
			  '#tabs a#this, #tabs a:hover, #pg td a:hover, #pg td a#th2 {color: #003366;}' +
			  '#tabs a#this, #tabs a:hover {background: #E1F4FB url(http://s.katz.cd/bg2.gif) repeat-x scroll 0 0;}' +
			  '#pg td a:hover, #pg td a#th2 {background: #E0F4FB url(http://s.katz.cd/bg3.gif) repeat-x scroll center bottom;}' +
			  '.on {background-color: #D2EEF7;}' +
			  'body{background-image:url("none");}' +
                          '.dl2 tbody a:hover {color: #006699;}';
			  
			
var dark = 'body {background-color: #000000; color: #FFFFFF;}' + 
			  'a:link, tbody a:link, tbody, #pans div a {color: #FFFFFF;}' + 
			  'a:visited { color: #FFFFFF; text-decoration: line-through;}' + 
			  '#tabs a, #pg td a, #pans {background: transparent; color: #FFFFFF;}' + 
			  '.dl1, .dl2 { background: transparent; }' + 
			  '#tabs a#this, #pg td a#th2 {background :#000000; background-color: #FFFFFF; color: #FF0000;}' + 
			  '.on, #tabs a:hover, #pg td a:hover {background :#000000; background-color: #666666; color: #FF0000;}' + 
			  'body{background-image:url("http://img.freecodesource.com/myspace-graphics/images/backgrounds/dark/1190789551-233-2.jpg");}' +
			  '.dl2 tbody a:hover {color: #FFFFFF;}'; 

var gnr = 'body {background-color: #DAA520; color: #FF0000 ;}' + 
		 	  'a:link, tbody a:link, tbody, #pans div a {color: #000000;}' + 
			  'a:visited { color: #C0C0C0; text-decoration: line-through;}' + 
			  '#tabs a, #pg td a, #pans {background: #FFD700; color: #000000;}' + 
			  '.dl1, .dl2 {background: #FFD700;}' + 
			  '#tabs a#this, #pg td a#th2 {background :#000000; background-color: #FFFFFF; color: #FF0000;}' + 
			  '.on, #tabs a:hover, #pg td a:hover {background :#000000; background-color: #666666; color: #FF0000;}' + 
			  'body{background-image:url("none");}' +			  
			  '.dl2 tbody a:hover {color: #C0C0C0;}'; 

var mblue = 'body {background-color: #000000; color: #FFFFFF;}' + 
			  'a:link, tbody a:link, tbody, #pans div a {color: #B0E0E6;}' + 
			  'a:visited { color: #FFFFFF; text-decoration: line-through;}' + 
			  '#tabs a, #pg td a, #pans {background: transparent; color: #FFFFFF;}' + 
			  '.dl1, .dl2 { background: transparent; }' + 
			  '#tabs a#this, #pg td a#th2 {background :#1E90FF; background-color: transparent; color: #87CEEB;}' + 
			  '.on, #tabs a:hover, #pg td a:hover {background :#000000; background-color: #666666; color: #1E90FF;}' + 
			  'body{background-image:url("http://friendster.bigoo.ws/content/layout/fantasy/fantasy_16.jpg");}' +
			  '.dl2 tbody a:hover {color: #1E90FF;}'; 
			  
var myurl = document.location;			  
if (/katz\.cd\//i.test(myurl))	{		  
	var curtheme = GM_getValue('theme', '');
} else {
	var curtheme = GM_getValue('theme', '');
}
if(curtheme !=null && curtheme !=""){
	document.getElementById('stheme').value = curtheme;
} 
var ctheme = document.getElementById('stheme');
selectTheme();




ctheme.addEventListener("change", selectTheme, true);



addGlobalStyle('#panc {overflow: visible; padding: 0px;}');
addGlobalStyle('#con { background: none; width: 800px;}');
addGlobalStyle('#pant {margin: 0px;}');
addGlobalStyle('.date {display: none;}');
addGlobalStyle('#im {display: none;}');
addGlobalStyle('iframe {display: none;}');
addGlobalStyle('#snap_com_shot_main {display: none;}');
addGlobalStyle('#panc a.adHeadline, #panc a.adText, .fright tad, .tad span.adHeadline {display: none;}');
addGlobalStyle('#spell {display: none;}');

			  


var rlads = document.getElementById('con').getElementsByTagName('div')[0];
rlads = document.getElementById('panr');
rlads.parentNode.removeChild(rlads);
rlads = document.getElementById('panl');
rlads.parentNode.removeChild(rlads);


function setFocus() {
	document.getElementByName("q").focus();
}

var myurl1 = document.location;
var i = 0;
if (/katz\.cd\//i.test(myurl1))
{
	var ad1 = document.getElementById('con').getElementsByTagName('div')[0];
	ad1.parentNode.removeChild(ad1); 
	
	for (i = 0; i <= 20; i ++ ) {
		var remhr = document.getElementById('panc').getElementsByTagName('hr')[0];
		
	}
	var srchbox = document.getElementById('pans').getElementsByTagName('form')[0].getElementsByTagName('input')[0];
	var remcop = document.getElementById('panc').getElementsByTagName('div')[3];
	remcop.parentNode.removeChild(remcop);
	if(document.getElementById('pg')) {
		}
	else {
		var noad1 = "Your search for <b>" + srchbox.value + "</b> did not produce any results.<br><br><br>";
		document.getElementById('panc').getElementsByTagName('div')[2].innerHTML = noad1;

	}
}

var myurl2 = document.location;
var i = 0;
if (/katzporn\.com\//i.test(myurl2))
{
	for (i = 0; i <= 0; i ++ ) { 
								
		var addiv = document.getElementById('con').getElementsByTagName('div')[0];
		addiv.parentNode.removeChild(addiv);
	}

	var addiv2 = document.getElementById('panc').getElementsByTagName('div')[0];
	addiv2.parentNode.removeChild(addiv2);
	
	for (i = 0; i <= 5; i ++ ){
		var remhr = document.getElementById('panc').getElementsByTagName('hr')[0];
		remhr.parentNode.removeChild(remhr);
	}
	var srchbox = document.getElementById('pans').getElementsByTagName('form')[0].getElementsByTagName('input')[0];
	var remcop = document.getElementById('panc').getElementsByTagName('div')[3];
	remcop.parentNode.removeChild(remcop);
	if(document.getElementById('pg')) {
		}
	else {
		var noad = "Your search for <b>" + srchbox.value + "</b> did not produce any results.<br><br><br>";
		document.getElementById('panc').getElementsByTagName('div')[2].innerHTML = noad;

	}
}