1.253 Bytes hinzugefügt
, 21:01, 21. Mär. 2016
/* Das folgende JavaScript wird für alle Nutzer der Mobilen Version geladen. */
( function( $, mw ) {
'use strict';
// Prefill the summary field on the Upload page with an Information template.
// Remove this when Bug 70146 is fixed.
function loadInformationTemplate() {
var $uploadDescription = $( '#wpUploadDescription' );
// Don't show when reuploading
if ( mw.util.getParamValue( 'wpDestFile' ) !== null ) return;
if ( $uploadDescription !== null && $uploadDescription.val() === '' ) {
// Prefill with template
$uploadDescription.val( '{{Information\n|Description=\n|Source=\n|Date=\n|Author=\n|Permission=\n|other_versions=\n}}\n' );
// Hide copy & pastable template in intro, since we just prefilled it automatically
$( '#Uploadtext-template-box' ).hide();
}
}
$( function() {
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Upload' ) {
loadInformationTemplate();
}
} );
}( jQuery, mediaWiki ) );
/*Für die Infoboxen (aufklappbar)*/
function fixtoggle() {
$('.mw-collapsible.fixtoggle').each(function(){
var toggle = $(this).find('.mw-collapsible-toggle').detach();
$(this).find('> .image').after(toggle);
});
}
$(document).ready(function() {
fixtoggle();
});