Difference between revisions of "MediaWiki:Common.js"
From Ryzom Commons
m |
|||
Line 1: | Line 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
function FillUploadForm() { | function FillUploadForm() { | ||
− | if( | + | if(document.getElementById('wpDestFile').value == "") { |
uploadDesc = document.getElementById('wpUploadDescription'); | uploadDesc = document.getElementById('wpUploadDescription'); | ||
− | uploadDesc.innerHTML = "{{Information | + | uploadDesc.innerHTML = wgCanonicalSpecialPageName + "{{Information |
|Description= | |Description= | ||
|Source= | |Source= | ||
Line 14: | Line 14: | ||
} | } | ||
addOnloadHook( FillUploadForm ); | addOnloadHook( FillUploadForm ); | ||
+ | <!-- wgCanonicalSpecialPageName == "" && --> |
Revision as of 02:35, 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
|Description=
|Source=
|Date=
|Author=
|Permission=
|other_versions=
}}";
}
}
addOnloadHook( FillUploadForm );
<!-- wgCanonicalSpecialPageName == "" && -->