TGP link fixer

By Yoto Last update Dec 19, 2010 — Installed 5,402 times.

There are 14 previous versions of this script.

// ==UserScript==
// @name          TGP link fixer
// @namespace     hello_test
// @description   Fix TGP links to direct links to gallery
// @include http://ebonysupply.com/*
// @include http://www.tgpebony.com/*
// @include http://www.universaltgp.com/*
// @include http://www.littleteengirls.net/*
// @include http://rosypalmtgp.com/*
// @include http://teenbe.com/*
// @include http://www.rhinosthumbs.com/*
// @include http://www.2teens.net/*
// @include http://www.theinterracialtgp.com/*
// @include http://www.interracialgang.com/*
// @include http://www.dogfartstyle.com/*
// @include http://pureinterracialsex.com/*
// @include http://blackwhitepleasure.com/*
// @include http://dpinterracial.com/*
// @include http://happymatures.com/*
// @include http://moms-tgp.com/*
// @include http://maturevideotgp.com/*
// @include http://www.pornoriver.net/*
// @include http://www.momtgp.com/*
// @include http://www.charmingmatures.com/*
// @include http://lewdgrannypics.com/*
// @include http://www.granny-post.com/*
// @include http://granny70.com/*
// @include http://grannycinema.com/*
// @include http://bravoteens.com/*
// @include http://www.bbw-mpegs.com/*
// @include http://chubbysextgp.com/*
// @include http://plumperhotties.com/*
// @include http://www.chubby-bbw.com/*
// @include http://sexyoldplumpers.com/*
// @include http://www.sexyhugegirls.com/*
// @include http://www.mature-post.com/*
// @include http://www.tgpmaturewoman.com/*
// @include http://www.maturesexscout.com/*
// @include http://mysinpower.com/*
// @include http://www.arabiancuties.com/*
// @include http://fuckmyindianass.com/*
// @include http://milfjerk.com/*
// @include http://www.milfhuntertgp.com/*
// @include http://www.boomerthumbs.com/*
// @include http://themilf.net/*
// @include http://milfionaire.com/*
// @include http://wifezilla.com/*
// @include http://bustymilfpics.com/*
// @include http://www.momsblowjobmovies.com/*
// @include http://comicstale.com/*
// @include http://hornymice.com/*
// @include http://www.unleashedfantasy.com/*
// @include http://perfectoldies.com/*
// @include http://nicemamas.com/*
// @include http://xxxcreatures.com/*
// @include http://bestmaturesthumb.com/*
// @include http://hotnudematures.com/*
// @include http://oldmomstgp.com/*
// @include http://maturewomanyoungboy.com/*
// @include http://momsneeddick.com/*
// @include http://gekilink.com/*
// @include http://www.japanesebeauties.net/*
// @include http://japanesetgp.net/*
// @include http://japanesesluts.org/*
// @include http://www.tokyothumbs.com/*
// @include http://lustfulladyboys.com/*
// @include http://extasians.com/*
// @include http://911asians.com/*
// @include http://www.asiansexgame.com/*
// @include http://www.edge-x.com/*
// @include http://www.newthumb.org/*
// @include http://www.japan-kiss.com/*
// @include http://www.4ero.net/*
// @include http://www.asiansexstation.com/*
// @include http://www.av4610.com/*
// @include http://www.teentiger.com/*
// @include http://teenageshowoffs.com/*
// @include http://www.pigletfarmer.com/*
// @include http://www.russian-tgp.com/*
// @include http://www.lacetongue.com/*
// @include http://yoursexyteens.com/*
// @include http://interracial6.com/*
// @include http://www.trip-to-pleasure.com/*
// @include http://interracialpornclips.com/*
// @include http://www.nopubestgp.com/*
// @include http://www.needredheads.com/*
// @include http://www.triple-x-porn-links.com/*
// @include http://www.tgpscene.com/*
// @include http://old-young-tgp.com/*
// @include http://www.free-mature-tgp.com/*
// @include http://familykiss.com/*
// @include http://momjerk.com/*
// @include http://nylon-milf.com/*
// @include http://milflab.com/*
// @include http://www.yourteendreams.com/*
// @include http://www.modelsboat.com/*
// @include http://www.babedumpster.com/*
// @include http://www.fresh-babes.com/*
// @include http://www.teens19.com/*
// @include http://www.puresologirls.com/*
// @include http://www.ftvmovs.com/*
// @include http://www.mosteroticteenz.com/*
// @include http://www.sologirlpussy.com/*
// @include http://www.100freeteenseries.com/*
// @include http://www.cumshotplanet.com/*
// @include http://www.cumbug.com/*
// @include http://tgirlsmovies.com/*
// @include http://nakedcumshots.com/*
// @include http://www.cumcat.com/*
// @include http://transthumbs.com/*
// @include http://hqshemale.com/*
// @include http://mysexytranny.com/*
// @include http://www.glamoroustranny.com/*
// @include http://www.trannybumping.com/*
// @include http://www.shemalevideotgp.com/*
// @include http://www.shemalecocktail.com/*
// @include http://cybertrannies.com/*
// @include http://shemalebuffet.com/*
// @include http://www.blackshemaletgp.com/*
// @include http://www.unrealshemales.com/*
// @include http://www.shemale-tgp.cc/*
// @include http://www.shemaleshouse.com/*
// @include http://www.realshemalemovies.com/*
// @include http://worldshemales.com/*
// @include http://www.blacksalamis.com/*
// @include http://ocxxx.com/*
// @include http://www.sickmonkey.com/*
// @include http://fatasstic.com/*
// @include http://amateurcocktail.com/*
// @include http://amateurcocktail.com/*
// @include http://amateurgalls.com/*
// @include http://amateurmonster.com/*
// @include http://youngama.com/*
// @include http://www.amateurlistings.com/*
// @include http://thailandtgp.com/*
// @include http://www.asianmystery.com/*
// @include http://www.911asians.com/*
// @include http://www.vintage-tgp.com/*
// @include http://www.sexvintagetgp.com/*
// @include http://boobsvintage.com/*
// @include http://www.adultvintage.com/*
// @include http://www.wowtgp.com/*
// @include http://www.publiccunt.com/*
// @include http://voyeursexvideo.com/*
// @include http://upskirtfree.org/*
// @include http://www.publicnude.org/*
// @include http://www.nymphet.tv/*
// @include http://www.lesbians-tgp.com/*
// @include http://www.sexlesbiantgp.com/*
// @include http://www.lesbiansdomination.com/*
// @include http://www.lesbianair.com/*
// @include http://analporntgp.com/*
// @include http://asexxx.net/*
// @include http://teensanalporn.com/*
// @include http://www.bestanusporn.com/*
// @include http://www.poppers-tgp.com/*
// @include http://super18tgp.com/*
// @include http://www.schwabensex.com/*
// @include http://www.bdsmworks.com/*
// @include http://medfet.com/*
// @include http://www.brutaltgp.com/*
// @include http://bdsmniche.com/*
// @include http://toiletmania.org/*
// @include http://www.peepeepleasures.com/*
// @include http://www.pissing-orgy.com/*
// @include http://peeingladies.com/*
// @include http://www.granny70.com/*
// @include http://www.grannycinema.com/*
// @include http://www.hotasstgp.com/*
// @include http://www.outsizebooty.com/*
// @include http://drunkpornparty.com/*
// @include http://drunk-whores.com/*
// @include http://howtohandjob.com/*
// @include http://www.dailyhandjobs.com/*
// @include http://www.handdicks.com/*
// @include http://cfnmtgp.net/*
// @include http://www.handjobextreme.com/*
// @include http://milfhandjob.net/*
// @include http://www.real-girls.net/*
// @include http://www.fattythumbs.com/*
// @include http://www.bbwpixie.com/*
// @include http://russianvoyeur.net/*
// @include http://www.russianangels.info/*
// @include http://www.crazypartybabes.com/*
// @include http://groupsex-tgp.com/*
// @include http://www.drunkenpartytgp.com/*
// @include http://www.freebabestgp.com/*
// @include http://www.xlxx.com/*
// @include http://teeny-babes.com/*
// @include http://www.stocking-vixens.com/*
// @include http://www.hairyerotica.com/*
// @include http://www.hairysextgp.com/*
// @include http://www.hairymomma.com/*
// @include http://www.madhairychicks.com/*
// @include http://www.bravoatk.com/*
// @include http://hairypussycuties.com/*
// @include http://africafucking.com/*
// @include http://ethnicpassion.com/*
// @include http://wildafricansluts.com/*
// @include http://www.sexgrouptgp.com/*
// @include http://www.hiddenhomemade.com/*
// @include http://homemadefacial.net/*
// @include http://www.amateurvideoteens.com/*
// @include http://www.jp-pussy.com/*
// @include http://www.jeanspics.com/*
// @include http://schoolthumbs.com/*
// @include http://www.bustyanddusty.com/*
// @include http://bustyteenstgp.com/*
// @include http://www.bratgp.com/*
// @include http://www.allbusty.net/*
// @include http://www.sexfistingtgp.com/*
// @include http://www.latinasupply.com/*
// @include http://www.latinaporntgp.com/*
// @include http://www.sexlatinatgp.com/*
// @include http://www.latinasnudes.com/*
// @include http://sugarlatinas.com/*
// @include http://www.dirtylatina.net/*
// @include http://mynylondreams.com/*
// @include http://www.cutepantyhose.com/*
// @include http://www.squirting-movie.com/*
// @include http://www.hugetits-tgp.com/*
// @include http://www.giantnaturaltgp.com/*
// @include http://titsie.com/*
// @include http://www.povporntgp.com/*
// ==/UserScript==

//------------------------------------------------------------------------------
// Get all links
var links = document.getElementsByTagName("a");
var sParams = ['url', 'URL', 'u']

init();

	// Iterate trough all links
	for(var i = 0; i<links.length; i++) {
		// Replace link with the correct one	
		for(var k = 0; k<sParams.length; k++)
		{
			if(getget(sParams[k], links[i].href))
			{
				links[i].href= getget(sParams[k],  unescape(links[i].href));
			}
		}
	}

/**
 * FUNCTIONS
 */
function getget(name, url) {
	var q = url;
	var i = q.indexOf(name + '=');
	
	if (i === -1) {
		return false;
	}

	var r = q.substr(i + name.length + 1, q.length - i - name.length - 1);

	i = r.indexOf('&');

	if (i !== -1) {
		r = r.substr(0, i);
	}

	return r.replace(/\+/g, ' ');
}

function init()
{
	var tgpBar = document.createElement('div');
	var body = document.getElementsByTagName('body') [0];

	tgpBar.innerHTML = '<a href="#" id="supportChecker" onclick="addToMonkey();" style="display: block; background-color: #FF0000; width: 10px; height: 10px; float: left; margin-right: 3px;" title="This TGP is supported! Click to add"></a>';
	//tgpBar.innerHTML += '<a href="#" onclick="hideVisited();" style="display: block; background-color: #0000FF; width: 10px; height: 10px; float: left; margin-right: 3px;" title="Hide visited galleries"></a>';
	//tgpBar.innerHTML += '<a href="#" onclick="addToBookmark();" style="display: block; background-color: #FFA500; width: 10px; height: 10px; float: left; margin-right: 3px;" title="Add to bookmarks"></a>';
	tgpBar.setAttribute('style', 'background-color: #DDFFDD; border: 1px solid #000; padding: 3px; position: fixed; top: 95%;');
	
	console.log(tgpBar);
	
	body.appendChild(tgpBar);	
}
/*
function checkCompatibility()
{
	var checkLink; // Random indeces of the links to check
	
	// For each supported parameter
	for(var i = 0; i<sParams.length; i++)
	{
		// Check 10 random links for comatibility
		for(var k = 0; k< 10; k++)
		{
			checkLink = random(0, links.length, 0.1);
			if(getget(sParams[i], links[k].href))
			{
				var supportButton = document.getElementById('supportChecker');
				supportButton.setAttribute('style', 'display: block; background-color: #00FF00; width: 10px; height: 10px; float: left; margin-right: 3px;');
                                return true;
			}
		}
	}
}
*/
function random(minVal,maxVal,floatVal)
{
  var randVal = minVal+(Math.random()*(maxVal-minVal));
  return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
}
//------------------------------------------------------------------------------