Greasy Fork

Falscher Fuffziger

Changing a picture on a special website

目前为 2015-05-29 提交的版本。查看 最新版本

// ==UserScript==
// @name           Falscher Fuffziger
// @namespace      Maxe Schmier aka Bochumer Junge
// @description    Changing a picture on a special website
// @version        1.0
// @include        http://www.geocaching.com/*
// @include        http://geocaching.com/*
// @require https://greasyfork.org/scripts/10114-variablenspeicher/code/Variablenspeicher.js?version=54230
// ==/UserScript==

////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
//	This is a script for a special Birthday-Mystery-Cache in Germany 
//	Bene's birthday => 22.11.2012
//	Congratulation BENE 
//
//	You can solve this puzzle without installing any software,
//	but it is more fun with Greasemonkey. Try it.
//	For any questions please contact the Owner of this cache
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////

var a, b, c, theSpan, newElement, theGCName, thisURL, thisContent, thisGCName;

//Titel des Geburtstagscaches
theGCName="Falscher Fuffziger"

///////////////////////////////////////////////////////////////////////////////
// Der Code
///////////////////////////////////////////////////////////////////////////////
try
{
	thisGCName = document.getElementById('ctl00_ContentBody_CacheName');
	
	if (thisGCName.innerHTML==theGCName) 
	{
		alert(a);
		theSpan = document.getElementById('ctl00_ContentBody_LongDescription');
		thisContent = theSpan.innerHTML;
		newElement=document.createElement("span");
		if (theSpan) 
		{	
			newElement.innerHTML = '<span id="ctl00_ContentBody_LongDescription"><a name="scrollto"></a>'+thisContent+'</span>';
			theSpan.parentNode.replaceChild(newElement, theSpan);
		}
		thisURL=this.location.href.replace("#scrollto","");
		window.location.href=thisURL+"#scrollto";
		alert(b);
		alert(c);
		theSpan = document.getElementById('ctl00_ContentBody_LongDescription');
		if (theSpan) 
		{
			newElement.innerHTML = '<span id="ctl00_ContentBody_LongDescription"> ' +
			    '<img src="data:image/jpg;base64,'+newDat+'">' + '</span>';
			theSpan.parentNode.replaceChild(newElement, theSpan);
		}
	
	
	}
	else
	{
		//alert('Script aktiv '+thisGCName.innerHTML);
	}
}
catch(e)
{
	//alert("GC Name nicht gefunden");
}