324 bytes removed ,  14:23, 14 July 2010
no edit summary
Line 99: Line 99:  
   
 
   
 
addOnloadHook( createCollapseButtons );
 
addOnloadHook( createCollapseButtons );
 +
 +
//
 +
// Insert a personalized Texttemplate into the Special:Upload edit box.
 +
//
 +
function delayedUpdateSpecialUpload()
 +
{
 +
var editbox = document.getElementById('wpUploadDescription');
 +
editbox.value = "{"+"{Information\n"
 +
              + "|Description={{de|}} {{en|}}\n"
 +
              + "|Source={{own}}\n"
 +
              + "|Date=\n"
 +
              + "|Author=[\n"
 +
              + "|Permission=See license\n"
 +
              + "}"+"}\n\n";
 +
}
 +
addOnloadHook(delayedUpdateSpecialUpload);
 
   
 
   
 
/** Test if an element has a certain class **************************************
 
/** Test if an element has a certain class **************************************
Line 1,131: Line 1,147:  
   
 
   
 
//</pre>
 
//</pre>
  −
  −
  −
//
  −
// Insert a personalized Texttemplate into the Special:Upload edit box.
  −
//
  −
function delayedUpdateSpecialUpload()
  −
{
  −
var editbox = document.getElementById('wpUploadDescription');
  −
editbox.value = "{"+"{Information\n"
  −
              + "|Description={{de|}} {{en|}}\n"
  −
              + "|Source={{own}}\n"
  −
              + "|Date=\n"
  −
              + "|Author=[\n"
  −
              + "|Permission=See license\n"
  −
              + "}"+"}\n\n";
  −
}
  −
function setSpecialUploadTemplate()
  −
{
  −
var uploadURL = 'http://wikivet.net/index.php/Special:Upload';
  −
  −
// I upload mostly my own work
  −
document.getElementById('n-uploadbtn').firstChild.href = uploadURL;
  −
  −
// preload input form
  −
if(window.location.href == uploadURL) setTimeout( "delayedUpdateSpecialUpload()", 1500 );
  −
}
  −
  −
addOnloadHook(setSpecialUploadTemplate);