Welcome to Square Enix Wiki! Be sure to check out our To-Do List to see what work we need done!

Difference between revisions of "MediaWiki:Common.js"

From Square Enix Wiki, the Fan-wiki for all things Square Enix
Jump to navigationJump to search
699 bytes added ,  17:21, 28 October 2014
no edit summary
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. */
/***************************************
/* Automatically add Aboutfile template to file upload description. Source: Porplemontage at khwiki.com (http://www.khwiki.com/MediaWiki:Common.js) */
if (mw.config.get('wgCanonicalSpecialPageName') === 'Upload' && !document.getElementById('wpForReUpload') && !document.getElementsByClassName('warning')[0] && !document.getElementsByClassName('error')[0]) {
function loadAutoAboutfileTemplate() {
uploadDescription = document.getElementById('wpUploadDescription');
var doubleBracket = '{' + '{';
uploadDescription.value = doubleBracket + 'aboutfile\n|description=\n|purpose=\n|game=\n|source=\n}}';
}
addOnloadHook(loadAutoAboutfileTemplate);
}


/***************************************
/***************************************

Navigation menu