MediaWiki:Beichtomat.js: Unterschied zwischen den Versionen

aus Kamelopedia, der wüsten Enzyklopädie
Zur Navigation springen Zur Suche springen
K (ein bischen schneller machen, dann fallen die Fehler nicht so auf ...)
K (hm ... kleine Idee ... nicht vorher getestet ... oje, oje ...)
Zeile 2: Zeile 2:
 
{
 
{
 
document.getElementById("insertadditionalhtml0").innerHTML = '<center><div class="handbutton" onclick="skipcontent(' + "'step0', 'step1'" + ')"><div class="text" onclick="step1()">Beichte starten</div></div></center>';
 
document.getElementById("insertadditionalhtml0").innerHTML = '<center><div class="handbutton" onclick="skipcontent(' + "'step0', 'step1'" + ')"><div class="text" onclick="step1()">Beichte starten</div></div></center>';
 +
document.getElementById("p-tb").innerHTML = '<h5>Werkzeuge</h5><div class="pBody"><img src="images/a/a4/Obi_et_Orbit.png" width="100%"></div>';
 
};
 
};
  

Version vom 26. September 2008, 17:26 Uhr

window.onload = function()
	{
	document.getElementById("insertadditionalhtml0").innerHTML = '<center><div class="handbutton" onclick="skipcontent(' + "'step0', 'step1'" + ')"><div class="text" onclick="step1()">Beichte starten</div></div></center>';
	document.getElementById("p-tb").innerHTML = '<h5>Werkzeuge</h5><div class="pBody"><img src="images/a/a4/Obi_et_Orbit.png" width="100%"></div>';
	};

//*function step1()
//*	{
//*	document.getElementsByTagName("h1")[0].innerHTML = document.getElementsByTagName("h1")[0].innerHTML + " online – mit dem Beichtomat™ v1.0 (beta)";
//*	document.getElementById("beichte").style.padding = '10px';
//*	document.getElementById("beichte").innerHTML = 'so weit bin ich noch nicht ... erstmal bei mir zuhause zum Laufen kriegen';
//*	}

var resizespeed = 8;

function reduceheight(page)
	{
	currentheight = document.getElementById(page).offsetHeight;
	if(currentheight - resizespeed >= 0)
		{
		document.getElementById(page).style.height = currentheight - resizespeed + "px";
		} else {
		document.getElementById(page).style.height = "0px";
		document.getElementById(page).style.display = "none";
		return "invisible";
		};
	};

function enlargeheight(page)
	{
	if (document.getElementById(page).style.display == "none")
		{
		document.getElementById(page).style.display = "";
		};
	if (document.getElementById(page).offsetHeight > document.getElementById(page + "inner").offsetHeight)
		{
		document.getElementById(page).style.height = "";
		return "visible";
		} else {
		currentheight = document.getElementById(page).offsetHeight;
		document.getElementById(page).style.height = currentheight + resizespeed + "px";
		};
	};
	
function hidecontent(page)
	{
	if (reduceheight(page) != "invisible")
		{
		reduceheight(page);
		setTimeout('hidecontent("' + page + '")', 1);
		};
	};

function showcontent(page)
	{
	if (enlargeheight(page) != "visible")
		{
		enlargeheight(page);
		setTimeout('showcontent("' + page + '")', 1);
		};
	};

function skipcontent(page1, page2)
	{
	if (reduceheight(page1) + enlargeheight(page2) != "invisiblevisible")
		{
		reduceheight(page1);
		enlargeheight(page2);
		setTimeout('skipcontent("' + page1 + '", "' + page2 + '")', 1);		
		};
	};