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

aus Kamelopedia, der wüsten Enzyklopädie
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
if( document.getElementById("wpTextbox1").value == "" &&
+
addOnloadHook( function () {
         (typeof(disableKamelionaryPreload) == "undefined" || !disableKamelionaryPreload)
+
    if( document.getElementById("wpTextbox1").value == "" &&
  )
+
         (typeof(disableKamelionaryPreload) == "undefined" || !disableKamelionaryPreload) )
insertPreload();
+
            insertPreload();
 +
} );
  
 
function insertPreload()
 
function insertPreload()

Version vom 7. Juni 2009, 18:23 Uhr

addOnloadHook( function () {
    if( document.getElementById("wpTextbox1").value == "" &&
        (typeof(disableKamelionaryPreload) == "undefined" || !disableKamelionaryPreload) )
            insertPreload();
} );

function insertPreload()
	{
	var getPreloadText = new Ajax.Request
	(
	"http://kamelopedia.mormo.org/index.php",
		{
		method:"get",
		parameters: "title=Vorlage:Kamelionary/preload&action=raw",
		onSuccess: function (trans) 
			{
			preloadText = trans.responseText.replace(/<[\/]?pre>/g, "");
			document.getElementById("wpTextbox1").value = preloadText;
			}
		}
	);
	};