HINWEIS! Das Helmstedt-Wiki befindet sich aus Zeitgründen im Nur-Lesen-Modus – Änderungswünsche einfach per E-Mail senden und geduldig sein.
MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Admin (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Admin (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
||
Zeile 6: | Zeile 6: | ||
*/ | */ | ||
mw.config.set( 'tableSorterCollation', {'Ä':'A', 'Ö':'O', 'Ü':'U', 'ä':'a', 'ö':'o', 'ü':'u', 'ß':'ss'} ); | mw.config.set( 'tableSorterCollation', {'Ä':'A', 'Ö':'O', 'Ü':'U', 'ä':'a', 'ö':'o', 'ü':'u', 'ß':'ss'} ); | ||
/** | /** | ||
* load the Edittools on [[Special:Upload]] and prefill the summary textarea | * load the Edittools on [[Special:Upload]] and prefill the summary textarea | ||
* Load pages: [[MediaWiki: | * Load pages: [[MediaWiki:Gadget-uploadtools.js]] | ||
*/ | */ | ||
if (mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Upload') { | if (mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Upload') { | ||
mw.loader.load('ext.gadget.uploadtools'); | |||
} | } | ||
Zeile 42: | Zeile 20: | ||
*/ | */ | ||
if (mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist') { | if (mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Watchlist') { | ||
mw.loader.load('//de.wikipedia.org/w/index.php?title=MediaWiki:Common.js/watchlist.js&action=raw&ctype=text/javascript'); | |||
} | } | ||
/* | /* | ||
Zeile 203: | Zeile 116: | ||
// using 'jquery.makeCollapsible': for messages | // using 'jquery.makeCollapsible': for messages | ||
// using 'user', 'mediawiki.user', 'user.options': wait for overrides in user.js | // using 'user', 'mediawiki.user', 'user.options': wait for overrides in user.js | ||
mw.loader.using( [ | mw.loader.using( [ 'jquery.makeCollapsible', 'user', 'mediawiki.user', 'user.options' ], function() { mw.hook( 'wikipage.content' ).add( function( $content ) { | ||
// allow setting NavigationBarShowDefault | // allow setting NavigationBarShowDefault | ||
var showDefaultCount = mw.user.options.get( 'NavigationBarShowDefault', | var showDefaultCount = mw.user.options.get( 'NavigationBarShowDefault', | ||
Zeile 255: | Zeile 168: | ||
} | } | ||
// iterate over all NavFrames | // iterate over all NavFrames | ||
var NavFrames = | var NavFrames = $content.find( 'div.NavFrame' ); | ||
// if more Navigation Bars found and not template namespace than Default: hide all | // if more Navigation Bars found and not template namespace than Default: hide all | ||
Zeile 292: | Zeile 205: | ||
/** Skript für [[Vorlage:Galerie]] */ | /** Skript für [[Vorlage:Galerie]] */ | ||
$( function() { | |||
if (document.URL.match(/printable/g)) return; | if (document.URL.match(/printable/g)) return; | ||
Zeile 382: | Zeile 295: | ||
}); | }); | ||
}); | }); | ||
} | } | ||
Zeile 448: | Zeile 331: | ||
} | } | ||
}); | }); | ||
} | } | ||
Zeile 564: | Zeile 352: | ||
* erzeuge einen "Neuen Abschnitt"-Link an der letzten Überschrift | * erzeuge einen "Neuen Abschnitt"-Link an der letzten Überschrift | ||
*/ | */ | ||
$( function() { | mw.loader.using( [ 'jquery.accessKeyLabel' ], function() { $( function() { | ||
var newSectionLink = $( '#ca-addsection a' ); | var newSectionLink = $( '#ca-addsection a' ); | ||
if( newSectionLink.length ) { | if( newSectionLink.length ) { | ||
var link = newSectionLink.clone(); //create a copy | var link = newSectionLink.clone(); //create a copy | ||
//avoid duplicate accesskey | //avoid duplicate accesskey | ||
link.removeAttr( 'accesskey' ). | link.removeAttr( 'accesskey' ).updateTooltipAccessKeys(); | ||
//add it within the brackets | //add it within the brackets | ||
var lastEditsectionLink = $( 'span.mw-editsection:last a:last' ); | var lastEditsectionLink = $( 'span.mw-editsection:last a:last' ); | ||
Zeile 577: | Zeile 363: | ||
lastEditsectionLink.after( ' | ' ); //see [[MediaWiki:Pipe-separator]] | lastEditsectionLink.after( ' | ' ); //see [[MediaWiki:Pipe-separator]] | ||
} | } | ||
}); | })}); | ||
/** | /** |