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