Difference between revisions of "MediaWiki:Common.js"

From Ryzom Commons

Jump to: navigation, search
Line 3: Line 3:
 
if(document.getElementById('wpDestFile').value == "") {
 
if(document.getElementById('wpDestFile').value == "") {
 
uploadDesc = document.getElementById('wpUploadDescription');
 
uploadDesc = document.getElementById('wpUploadDescription');
uploadDesc.innerHTML = wgCanonicalSpecialPageName + "{{Information
+
uploadDesc.innerHTML = wgCanonicalSpecialPageName + "{{Information\n|Description=\n|Source=\n|Date=\n|Author=\n|Permission=\n|other_versions=\n}}";
|Description=
 
|Source=
 
|Date=
 
|Author=
 
|Permission=
 
|other_versions=
 
}}";
 
 
}
 
}
 
}
 
}
 
addOnloadHook( FillUploadForm );
 
addOnloadHook( FillUploadForm );

Revision as of 02:38, 30 May 2010

/* Any JavaScript here will be loaded for all users on every page load. */
function FillUploadForm() {
if(document.getElementById('wpDestFile').value == "") {
uploadDesc = document.getElementById('wpUploadDescription');
uploadDesc.innerHTML = wgCanonicalSpecialPageName + "{{Information\n|Description=\n|Source=\n|Date=\n|Author=\n|Permission=\n|other_versions=\n}}";
}
}
addOnloadHook( FillUploadForm );